KonectarApp/lib/contacts_module/network_connection/network_check.dart

11 lines
292 B
Dart
Raw Permalink Normal View History

2024-10-08 12:01:59 +00:00
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;
}
}