Overview
A Flutter package that provides a useNetworkState hook for monitoring network connectivity in applications. It enables developers to track real-time connection status, detect network type (e.g., Wi-Fi, cellular), and gracefully handle offline scenarios. Ideal for apps requiring responsive behavior based on network availability, such as data syncing, loading states, or user feedback during connectivity changes. The package supports all major platforms including Android, iOS, Web, macOS, Windows, and Linux.
Use cases
- Real-time network status monitoring
- Handling offline modes
- Dynamic UI updates based on connectivity
- Data synchronization with network checks
- User feedback during connectivity loss
Key features
- useNetworkState hook
- Detects network type
- Supports multiple platforms
- Offline scenario handling
- Real-time connectivity updates
Suitable for
- Apps needing network awareness
- Developers using hooks pattern
- Cross-platform network monitoring
- UIs that adapt to connectivity
- Offline-first application design
Considerations
- Requires internet permission on mobile
- May trigger frequent rebuilds
- Platform-specific behavior differences
- Limited to basic connectivity detection
- No built-in retry logic