networkIsConnected property
Will emit bool
whether the network is connected or not when its status changes.
Implementation
Stream<bool> get networkIsConnected => _stream.map((event) {
if (event is NetworkIsUpEvent) {
return true;
} else if (event is NetworkIsDownEvent) {
return false;
}
return _isNetworkAvailable;
});