cross_connectivity
3.3.0, released 2 years ago by thisismarch.dev
Flutter plugin to monitor real network connectivity across mobile, web, and desktop.
What it does
Provides streams and one‑time checks for real network connectivity. It also offers a widget builder for UI updates.
AI-written summary of version 3.3.0, based on the package's README and metadata. Report an inaccuracy
Use it when
- Need real network status across iOS, Android, Web, Windows, Linux, macOS
- Require stream‑based updates for UI
- Want a single plugin for all platforms
Skip it when
- Only need simple connectivity check
- Need Wi‑Fi SSID or BSSID info (removed APIs)
Strengths
- Cross‑platform support
- Stream‑based API for reactive UI
- Simple one‑liner usage
- No code generation required
Weaknesses
- Removed Wi‑Fi info APIs
- Depends on connectivity_plus
- Requires Flutter SDK >=3.5.0
Setup
- Kind
- Flutter widgets
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 4
Add dependency in pubspec, import package, no special permissions needed
import 'package:cross_connectivity/cross_connectivity.dart';
final isConnected = CrossConnectivity.isConnected;
final status = CrossConnectivity.onConnectivityChanged;
CrossConnectivity.checkConnection().then((connected) => print(connected));Alternatives
Packages that do the same job and could replace cross_connectivity.
- flml_internet_checker
Zero-dependency internet connectivity checker with blocking screens and banners.
67Compare - internet_connection_checker_plus
Verifies actual internet connectivity by checking reachability against global endpoints.
82Compare - vibration
A plugin for handling the Vibration API on iOS, Android, web, and OpenHarmony.
80Compare - connectivity_control
Inspects active network interfaces, internet capability, validation, metering, and bandwidth.
73Compare
Works with
Packages commonly used together with cross_connectivity: ones it builds on, ones built on it, and its own family.
- rxdartcross_connectivity depends on itImplementation of the ReactiveX API for asynchronous programming leveraging native Dart Streams.
- connectivity_pluscross_connectivity depends on itDiscover the state of network connectivity (WiFi, mobile, ethernet) on Android, iOS, Web and desktops.
- cross_platformSame familyUnified API for detecting the current platform and basic system info across Flutter, web, and desktop.
- cross_local_storageSame familySharedPreferences wrapper for Mobile, Web, and Desktop with JSON file storage support.