I already added connectivity plugin on my pubspec.yaml
.
connectivity: ^0.4.6
But still getting this error:
E/flutter ( 4789): [ERROR:flutter/lib/ui/ui_dart_state.cc(148)] Unhandled Exception: MissingPluginException(No implementation found for method check on channel plugins.flutter.io/connectivity)
E/flutter ( 4789): #0 MethodChannel.invokeMethod (package:flutter/src/services/platform_channel.dart:314:7)
E/flutter ( 4789):
E/flutter ( 4789): #1 Connectivity.checkConnectivity (package:connectivity/connectivity.dart:73:47)
error connectivity is from this line :
Future<ConnectivityResult> checkConnectivity() async {
final String result = await methodChannel.invokeMethod<String>('check');
return _parseConnectivityResult(result);
}
and I never modified this package, But still get this error no matter what version of this plugin that I use. I hope anyone can help me to solve this error, thank you. Sorry for my bad English.