hasConnection property
bool
get
hasConnection
Indicates the current network connectivity status:
true→ device is online.false→ device is offline.
Implementation
bool get hasConnection => _connectivitySubject.value;