no_internet_check 0.0.6 copy "no_internet_check: ^0.0.6" to clipboard
no_internet_check: ^0.0.6 copied to clipboard

outdated

Automatically show no internet screen on top of your current screen and when there is internet it automatically pop the no inter screen.

no_internet_check #

A Flutter Package that depends on internet_connection_checker and flutter_toast. This package check the internet connectivity. If there is no internet, it show not internet screen. And if there is internet it will return you back to previous screen where you are.

Note that this plugin is just a test. you can fork it and make it better.

Quick start #

You can refer to example code.

add this line inside MaterialApp.

 navigatorKey: NavigationService.navigationKey,

call this method inside splash screen or inside your app first screen. if you are using await inside your main method. then you can also paste this code inside your main method.

 InternetChecker(); //optional: you can pass custom no internet page as an argument

And You are done

if you are hitting autologin api inside splash screen

 if (IndexClass.index == 0) {  // there is internet
       checkAutoLogin();
     } else { // there is no internet
       WidgetsBinding.instance.addPostFrameCallback((timeStamp) {
         NavigationService.navigateTo().then((value) {
           checkAutoLogin(); 
         });
       });
     }
14
likes
0
pub points
68%
popularity

Publisher

unverified uploader

Automatically show no internet screen on top of your current screen and when there is internet it automatically pop the no inter screen.

Homepage
Repository (GitLab)
View/report issues

License

unknown (license)

Dependencies

flutter, flutter_toastr, internet_connection_checker

More

Packages that depend on no_internet_check