Write this somewhere
class DevHttpOverrides extends HttpOverrides {
@override
HttpClient createHttpClient(SecurityContext context) {
return super.createHttpClient(context)
..badCertificateCallback = (X509Certificate cert, String host, int port) => true;
}
}
HttpOverrides.global = new DevHttpOverrides();
https://stackoverflow.com/questions/59622087/flutter-https-with-self-signed-certificate
Comments