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

A new Flutter package for 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:

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';

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!",
            ));

            ....

      }

Note: You can customize the design of bottom sheet by giving properties in checkInternetAndProceed method of this package.

2
likes
60
pub points
0%
popularity

Publisher

unverified uploader

A new Flutter package for network connectivity troubleshoot

Repository (GitHub)
View/report issues

Documentation

API reference

License

unknown (LICENSE)

Dependencies

flutter

More

Packages that depend on network_connectivity_troubleshoot