getCertificate method

  1. @override
Future<SslCertificate?> getCertificate()

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:

Implementation

@override
Future<SslCertificate?> getCertificate() async {
  Map<String, dynamic> args = <String, dynamic>{};
  Map<dynamic, dynamic>? result = await channel?.invokeMethod(
    'getCertificate',
    args,
  );
  if (result != null) {
    return SslCertificate.fromMap(wireMap(result));
  }
  return null;
}