networkState property

NetworkStateData get networkState

Plugin should retrieve networkState & networkConst while start

Implementation

NetworkStateData get networkState {
  try {
    return NetworkStateData.fromJson(Map<String, dynamic>.from(
        _cache.read(_getNetworkCacheKey(net_state_cache_key)) ?? {}));
  } catch (err) {
    print(err);
  }
  return NetworkStateData();
}