internet_popup 1.0.0 internet_popup: ^1.0.0 copied to clipboard
A package for popUp message when Internet connection is off
internet_popup #
A package that shows a pop up alert when the internet connection is lost
Installation #
In your pubspec.yaml
dependencies:
internet_popup: ^1.0.0
import 'package:internet_popup/internet_popup.dart';
Usage #
initialize InternetPopup class and add context inside initState()
funtion of the top of your widget tree.
InternetPopup().initialize(context: context);
when the widget is popped from widget tree, initialize it again on next page.
If you want your own widget to popUp, use
InternetPopup().initializeCustomWidget(context: context, widget: /*** your custom widget ***/);