Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CRUD example required #84

Open
julianoventola opened this issue Jun 21, 2022 · 1 comment
Open

CRUD example required #84

julianoventola opened this issue Jun 21, 2022 · 1 comment

Comments

@julianoventola
Copy link

I tried to build a simples "to-do" API, but i am struggling a lot about how to handle the async context in routes that are waiting a Widget as return. How am i supposed to use it?

Also, i tried to use the "example" of get_server tab and it needs some updates.

Great work tho!

image

@jonataslaw
Copy link
Owner

The ways of managing asynchronous states works in theory the same way Flutter works. For example, you can use the Visibility Widget to not display the response until the data is available:
Ex: https://github.com/jonataslaw/get_server/blob/master/example/lib/pages/visibility/visibility.dart

You can also use the FutureBuilder widget, like in Flutter, or use GetX's built-in state manager to make updates.
Remember this is for http where you can only deliver one request, for two-way communication you need to use websockets.
I'll update the documentation and example over the weekend, I'm a little out of time right now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants