11 lines
292 B
Dart
11 lines
292 B
Dart
|
import 'dart:async';
|
||
|
|
||
|
import 'package:connectivity_plus/connectivity_plus.dart';
|
||
|
|
||
|
class NetworkConnectivity {
|
||
|
Future<bool> isInternetAvailable() async {
|
||
|
var connectivityResult = await (Connectivity().checkConnectivity());
|
||
|
return connectivityResult != ConnectivityResult.none;
|
||
|
}
|
||
|
}
|