getCertificate method
- @SupportedPlatforms.new(platforms: [AndroidPlatform(apiName: 'WebView.getCertificate', apiUrl: 'https://developer.android.com/reference/android/webkit/WebView#getCertificate()'), IOSPlatform(), MacOSPlatform(), WindowsPlatform(), LinuxPlatform(apiName: 'webkit_web_view_get_tls_info', apiUrl: 'https://wpewebkit.org/reference/stable/wpe-webkit-2.0/method.WebView.get_tls_info.html')])
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 WebView (Official API - WebView.getCertificate)
- iOS WKWebView
- macOS WKWebView
- Windows WebView2
- Linux WPE WebKit (Official API - webkit_web_view_get_tls_info)
Use the PlatformInAppWebViewController.isMethodSupported method to check if this method is supported at runtime.
Implementation
@SupportedPlatforms(
platforms: [
AndroidPlatform(
apiName: 'WebView.getCertificate',
apiUrl:
'https://developer.android.com/reference/android/webkit/WebView#getCertificate()',
),
IOSPlatform(),
MacOSPlatform(),
WindowsPlatform(),
LinuxPlatform(
apiName: 'webkit_web_view_get_tls_info',
apiUrl:
'https://wpewebkit.org/reference/stable/wpe-webkit-2.0/method.WebView.get_tls_info.html',
),
],
)
Future<SslCertificate?> getCertificate() {
throw UnimplementedError(
'${PlatformInAppWebViewControllerMethod.getCertificate.name} is not implemented on the current platform',
);
}