Package selection guidance compiled from public package information, community data, and project usage.
A lightweight Flutter widget that automatically displays a custom UI when the device is offline, switching seamlessly to an online view when connectivity is restored. It requires no additional dependencies or boilerplate code, making it easy to integrate into any Flutter app. The widget monitors network status in real time and provides a clean, declarative way to handle offline states without complex logic. Ideal for apps that need immediate feedback on connectivity changes.
Use cases
Displaying offline placeholders in apps
Providing user feedback during connectivity loss
Enhancing UX with dynamic online/offline views
Simplifying network state management
Building resilient UIs for unreliable networks
Key features
Automatic network status detection
Minimal setup with no extra dependencies
Customizable online and offline widgets
Real-time connectivity monitoring
No boilerplate code required
Suitable for
Simple apps needing basic offline support
Developers seeking quick network state solutions
Apps requiring responsive UIs for connectivity changes
Projects with tight development timelines
Teams avoiding complex network handling
Considerations
Limited to basic online/offline detection
Does not handle specific network types (e.g., Wi-Fi vs cellular)
No built-in retry mechanisms for failed requests
Not suitable for advanced network diagnostics
Relies on platform-level connectivity APIs
Original README
Original README snapshot from the linked source repository. Visit the repository for the latest content.
flutter_no_internet_widget
Overview
A new Flutter widget shows online or offline screens without extra code or dependencies.
We need a lot of boilerplate code to check every project's network connectivity. Why can't there be a single package that takes care of everything and make the developer's life easy?
I also had the same question and have created this simple widget to help myself and others.
Use case
The package's primary purpose is to show a default offline screen and a mandatory online screen provided while initializing.
Declare this widget at the top of the widget tree once. Whenever there is no internet, the default offline screen or the provided screen will be displayed.