setHttpsCertificateVerification method
Implementation
void setHttpsCertificateVerification({String? pem, bool enable = false}) {
if (enable) {
(_dio?.httpClientAdapter as IOHttpClientAdapter).createHttpClient = () {
HttpClient client = HttpClient();
client.badCertificateCallback = (X509Certificate cert, String host, int port) {
if (cert.pem == pem) {
return true;
}
return false;
};
return client;
};
}
}