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