How to Implement “No Internet” / Offline Notification Page in Flutter

Desuvit
CodeX
Published in
5 min readDec 13, 2021

--

How to Implement “No Internet” / Offline Notification Page in Flutter

The Internet is the basic need for any App to work. When a user opens an App, it is better practice to find if the internet is active or not and inform the user if there is no internet connection. There are many ways the user can be notified which changes from App to App. Below are few ways which can be used,

  • Through a simple push notification.
  • Through an alert or a dialog.
  • Through an independent page with some custom good looking design.

Additionally, the App should be able to resume if the change in network connection state starts working.

The focus of this article is not only to implement NoInternet functionality which is available in many articles and blogs which is pretty straight forward. But, this article is focused on how one can handle the network disconnectivity and show a custom page in a custom centralized manner.

To implement a no internet functionality, we are going to use few packages and classes of Flutter SDK which are as follows,

ChangeNotifier

ChangeNotifier is a simple class included in the Flutter SDK which provides change notification to its listeners. In other words, if something is a ChangeNotifier, you can subscribe…

--

--

Desuvit
CodeX
Writer for

Desuvit is a Norway born software development company delivering Innovative IT Solutions to medium size biz & startups. System Development | Mobile Apps | Web