Exception:
this class is to Unhandled Exception: HandshakeException: Handshake error in client (OS Error:
CERTIFICATE_VERIFY_FAILED: ok(handshake.cc:354))
Solution:
In your main.dart file, add or import the following class:
class MyHttpOverrides extends HttpOverrides {
@override
HttpClient createHttpClient(SecurityContext context) {
return super.createHttpClient(context)
..badCertificateCallback =
(X509Certificate cert, String host, int port) = true;
}
}
And add to main method:
HttpOverrides.global = new MyHttpOverrides();