You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For now, you can use the WidgetEmpty class which prevents the server from sending any response until the returned widget changes Its state. Thus you have multiple options that will do the same thing and any widget that can change state will do the trick:
1. FutureBuilder
return FutureBuilder(
future: [YOUR ASYNC FUNCTION HERE],
builder: (context, snapshot) {
if (snapshot != null && snapshot.connectionState == ConnectionState.done) {
return [YOUR RESPONSE, It could be Json() or a widget];
} else {
// This will prevent the server from sending any response until your async function completes
return WidgetEmpty();
}
},
);
I like the
get_server
package but here I'm facing problem withasync
andawait
during response.The text was updated successfully, but these errors were encountered: