I am writing my first flutter app. I use there http.post request for logging user and also for changing data on server. When i turn off the internet connection it keeps waiting for the response and never falls into error. Is there any way to do that? I have been searching but haven't found anything.
Thanks!
Here is my code:
http.post(url).catchError((_) { active = previousState; notifyListeners(); });