DiscoverModule/lib/ui_screen/interactionform/NewtworkConnectivity.dart

11 lines
292 B
Dart
Raw Normal View History

2024-05-20 10:29:02 +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;
}
}