getCertificate method
Gets the SSL certificate for the main top-level page or null if there is no certificate (the site is not secure).
Officially Supported Platforms/Implementations:
- Android native WebView (Official API - WebView.getCertificate)
- iOS
- MacOS
- Windows
Implementation
@override
Future<SslCertificate?> getCertificate() async {
Map<String, dynamic> args = <String, dynamic>{};
Map<String, dynamic>? sslCertificateMap =
(await channel?.invokeMethod('getCertificate', args))
?.cast<String, dynamic>();
return SslCertificate.fromMap(sslCertificateMap);
}