Relative Content

Tag Archive for flutterasynchronousconnectionflutter-stateflutter-streambuilder

How can I achieve connection check globally across the flutter application?

I would like to make my flutter application to be able to check the connection status and prompt a warning if the wifi and mobile network is turned off. However, I want to make this globally across the application which means the application will constantly listen for network changes until the application is exited. I do not know how to achieve that. I use Provider as the state management for my project. The package I use for checking the network status are internet_connection_checker and connectivity_plus.