badCertificateCallback method
Handles a bad certificate triggered by HttpClient.
Should return true
to accept a bad certificate (like a self-signed).
Defaults to ![production], since in production the staging certificate is invalid.
Implementation
bool badCertificateCallback(X509Certificate cert, String host, int port) {
return !production;
}