confirm_connection_network
0.1.1, released 4 years ago by flutteriraqi.com
Check network connectivity status on Android and iOS devices.
What it does
Allows Flutter apps to check if the device is currently online or offline using native network capabilities and monitors. It uses NetworkCapabilities for Android and NetworkMonitor for iOS.
AI-written summary of version 0.1.1, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need to check if the device's internet connection is online or offline.
- You want a simple asynchronous method to verify network availability.
Skip it when
- You need detailed continuous stream monitoring of connectivity changes.
- You require advanced network topology information beyond simple online/offline checks.
Strengths
- Simple API using ConfirmConnection.confirmConnection().
- Uses native Android NetworkCapabilities and iOS NetworkMonitor.
Weaknesses
- Lacks documented continuous streaming of status changes in the core example.
- Limited information regarding features for desktop platforms despite platform declarations.
Setup
- Kind
- Flutter widgets
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 0
Requires INTERNET and ACCESS_NETWORK_STATE permissions in the Android Manifest. Minimum Android SDK version 16 and iOS version 10.0 required.
checkConnection() async {
if (await ConfirmConnection.confirmConnection()) {
print("you are online");
} else {
print("you are offline");
}
}Alternatives
Packages that do the same job and could replace confirm_connection_network.
- connectivity_plus
More widely adopted, actively maintained by the Flutter team/community, and provides comprehensive stream-based connectivity updates across multiple platforms.
97Compare