I know how to check connectivity for single page. But I want to how I can Internet connectivity throughout all the pages in flutter.
Asked
Active
Viewed 1,950 times
0
-
Does this answer your question? [Check whether there is an Internet connection available on Flutter app](https://stackoverflow.com/questions/49648022/check-whether-there-is-an-internet-connection-available-on-flutter-app) – Md. Yeasin Sheikh Dec 25 '21 at 10:42
-
You can save use state-management to share the resource, in your case network status – Md. Yeasin Sheikh Dec 25 '21 at 10:44
1 Answers
0
You can use the connectivity_plus plugin to check for network availability. Instead of checking for network on every screen, you can place the network checker on the class where network connectivity is needed i.e. the repository for http requests. With this approach, the network is checked when it's needed.

Omatt
- 8,564
- 2
- 42
- 144