connectivity_builder 0.2.1 copy "connectivity_builder: ^0.2.1" to clipboard
connectivity_builder: ^0.2.1 copied to clipboard

Easily manage UI states based on network connectivity with the connectivity_builder package.

connectivity_builder #

Need a great Flutter developer? I'm available #

The connectivity_builder package provides a simple and convenient way to manage different UI states based on the network connectivity status of your Flutter app.

Features #

  • Effortless UI Adaptation: Build distinct widgets for online and offline scenarios without manual network checks.
  • Real-time Network Monitoring: Automatically detect and respond to network connectivity changes, ensuring a seamless user experience.
  • Lightweight and Easy to Use: Integrate the package seamlessly into your existing Flutter app with minimal effort.

Getting Started #

Installation #

  1. Add the connectivity_builder package to your pubspec.yaml file:
dependencies:
  connectivity_builder: ^latest_version
  1. Run flutter pub get to install the package.

Usage #

The ConnectivityBuilder widget provides a simple way to manage UI states based on network connectivity:

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        body: ConnectivityBuilder(
          onlineBuilder: (context) => Center(child: Text('ONLINE 🌍')),
          offlineBuilder: (context) => Center(child: Text('OFFLINE 🚫')),
        ),
      ),
    );
  }

This will display a "No internet connection available" message when the device is offline and your app's main content when the device is online.

Additional Information #

Contributing #

Contributions to the connectivity_builder package are welcome! Please read the contributing guidelines for more information.

Reporting Issues #

If you encounter any bugs or have suggestions for improvements, please file an issue on the GitHub repository.

License #

This project is licensed under the MIT License.

8
likes
140
pub points
69%
popularity

Publisher

verified publisherwevr.tech

Easily manage UI states based on network connectivity with the connectivity_builder package.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (LICENSE)

Dependencies

connectivity_plus, flutter

More

Packages that depend on connectivity_builder