onBadCertificate property
onBadCertificate
is an optional handler for unverifiable certificates. The handler receives the X509Certificate, and can inspect it and decide (or let the user decide) whether to accept the connection or not. The handler should return true to continue the SecureSocket connection.
Implementation
final bool Function(X509Certificate)? onBadCertificate;