What I'm trying to implement is something like this,
showDialog();
await firebaseFunction();
await apiFunction();
hideDialog();
This will work properly if the internet connection is on. But what should I do if the internet connection is turned off suddenly? As if that happens, the app will get stuck on the future functions and the screen of the app will be stuck on the dialog. I want to pop the dialog whenever the internet connection goes off. Are there an dependencies that'll help me do that?