Replies: 1 comment
-
"if the network is not available, I display the button. on pressure the following logic: " I wonder why you need setState() in this place. Did you try the following?
The other part looks okay, I would propably place the connectivity check in the API or HTTP Client repository and throw a custom exception if there is no-connectivity. Then you would be able to handle the no-connectivity and any other exception in "error: _bodyForError", so you wouldn't need the "if (netAvailable) ...." statement in this and other providers with API requests. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have FutureProvider in my app:
});
Beta Was this translation helpful? Give feedback.
All reactions