isNetworkEnabled function

Future<bool> isNetworkEnabled()

Returns true if the Network provider is enabled

Implementation

Future<bool> isNetworkEnabled() async {
  final response = await _platform.isNetworkEnabled();
  if (response == null) {
    throw Exception('Error while getting Network status');
  }
  return response;
}