flutter_offline
6.0.0, released a year ago by jogboms.xyz
Widget to detect and display online/offline status in Flutter apps.
What it does
Provides a widget that listens to connectivity changes and shows a UI banner indicating online or offline state. It wraps your content so you can react to network availability without writing boilerplate code.
AI-written summary of version 6.0.0, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need a quick visual indicator of network connectivity
- You want to show different UI when the app is offline
- You prefer a widget‑based solution over manual stream handling
Skip it when
- You need fine‑grained network request retry logic
- You require custom connectivity handling beyond a simple banner
- You want a full‑featured networking stack
Strengths
- Very easy to drop into existing UI
- Works on all major Flutter platforms
- Handles permission and platform differences internally
Weaknesses
- Only provides UI feedback, not request queuing or caching
- Limited customization of the offline widget
- Relies on connectivity_plus which may have its own limitations
Setup
- Kind
- Flutter widgets
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 2
Add <uses-permission android:name="android.permission.INTERNET"/> to AndroidManifest if not present
OfflineBuilder(
connectivityBuilder: (context, connectivity, child) {
final connected = !connectivity.contains(ConnectivityResult.none);
return Stack(
children: [
Positioned(
height: 24,
left: 0,
right: 0,
child: Container(
color: connected ? Color(0xFF00EE44) : Color(0xFFEE4400),
child: Center(child: Text(connected ? 'ONLINE' : 'OFFLINE')),
),
),
child,
],
);
},
child: Center(child: Text('Content')),
);Alternatives
Packages that do the same job and could replace flutter_offline.
- internet_connection_checker_plus
Verifies actual internet connectivity by checking reachability against global endpoints.
82Compare - connectivity_plus_tizen
Tizen implementation of the connectivity_plus plugin for checking network status.
71Compare - flml_internet_checker
Zero-dependency internet connectivity checker with blocking screens and banners.
67Compare
Works with
Packages commonly used together with flutter_offline: ones it builds on, ones built on it, and its own family.