onConnectivityChanged property
Fires whenever the connectivity state changes.
Implementation
@override
Stream<List<ConnectivityResult>> get onConnectivityChanged {
_onConnectivityChanged ??= eventChannel
.receiveBroadcastStream()
.map((dynamic result) => List<String>.from(result))
.map(parseConnectivityResults);
return _onConnectivityChanged!;
}