I am trying to get the user connection and am getting this error. Here is the code:
import 'package:connectivity_plus/connectivity_plus.dart';
Future<String> LoadData() async {
//First, check for connectivity
final connectivityResult = await (Connectivity().checkConnectivity());
return '';
}
PUBSPEC.yaml
connectivity_plus: ^3.0.6
Thanks!
you have to restart the app or do the following step
flutter clean
flutter pub get
flutter run