connectivity_wrapper
2.0.1, released 6 days ago by dart.nonstopio.com
Provides network-aware widgets and connectivity feedback for Flutter applications.
What it does
A Flutter package that offers network-aware widgets to give users feedback when they are offline or when connectivity is lost. It integrates with provider and connectivity_plus to monitor network changes and update UI elements accordingly.
AI-written summary of version 2.0.0, based on the package's README and metadata. Report an inaccuracy
Use it when
- You want to display a banner or overlay when the user loses internet connection.
- You need to disable specific UI components (like sign-in buttons) when offline.
- You want a simple declarative way to handle network-aware widgets app-wide or per-screen.
Skip it when
- You need complex network state management beyond simple online/offline UI feedback.
- You are relying solely on connectivity state for making critical network calls without timeout handling.
Strengths
- Easy setup for global or per-screen offline feedback via wrapper widgets.
- Supports custom offline widgets, messages, and decorations.
- Built-in handling of subscription disposal and resource cleanup.
Weaknesses
- Depends on the underlying platform connectivity checks which may occasionally give false positives.
- Requires specific platform configurations (such as Android Gradle Plugin, Java 17, and iOS 13+ for v2.0.0).
Setup
- Kind
- Flutter widgets
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 3
Requires Dart 3.6+ and updates to platform settings such as Java 17, Android Gradle Plugin 8.12.1+, Gradle 8.13+, iOS 13+, and macOS 10.15+ for connectivity_plus 7.x compatibility.
ConnectivityAppWrapper(
app: MaterialApp(
home: MenuScreen(),
builder: (buildContext, widget) {
return ConnectivityWidgetWrapper(
child: widget,
disableInteraction: true,
height: 80,
);
},
),
)Alternatives
Packages that do the same job and could replace connectivity_wrapper.
- connectivity_checker
Provides network-aware widgets and checks internet connectivity status.
39Compare - upgrader
Prompt users to upgrade when a newer version of the app is available in the store.
91Compare - wifi_iot
Flutter plugin to handle Wi-Fi connections and hotspot (AP, STA) on Android and iOS
81Compare - web_browser_detect
Detect which browser and version is in use on Flutter Web.
79Compare
Works with
Packages commonly used together with connectivity_wrapper: ones it builds on, ones built on it, and its own family.
- connectivity_plusconnectivity_wrapper depends on itDiscover the state of network connectivity (WiFi, mobile, ethernet) on Android, iOS, Web and desktops.
- material_uiconnectivity_wrapper depends on itOfficial Flutter Material UI library implementing Google’s Material Design system.
- providerconnectivity_wrapper depends on itA lightweight wrapper around InheritedWidget for state management