Last updated:
0 purchases
network connectivity troubleshoot
This Package is useful in case the internet is not available. A bottom sheet pops up
with the image and text that app is not connected with internet. A button
is also available to try again.
Getting Started #
In your flutter project add the dependency:
dependencies:
...
network_connectivity_troubleshoot:
copied to clipboard
For help getting started with Flutter, view the online
documentation.
Usage example #
import 'package:network_connectivity_troubleshoot.dart'
import 'package:network_connectivity_troubleshoot/network_connectivity_troubleshoot.dart';
copied to clipboard
To make this to work in your project add this addPostFrameCallback() in build method of
your class before your return widget tree.
@override
Widget build(BuildContext context) {
WidgetsBinding.instance!.addPostFrameCallback(
(_) => CheckInternetConnectivity().checkInternetAndProceed(
context,
title: "No Internet",
buttonText: "Try Again!",
));
....
}
copied to clipboard
Note: You can customize the design of bottom sheet by giving properties in checkInternetAndProceed method
of this package.
For personal and professional use. You cannot resell or redistribute these repositories in their original state.
There are no reviews.