isSecureContext method

  1. @override
Future<bool> isSecureContext()

Indicates whether the webpage context is capable of using features that require secure contexts. This is implemented using Javascript (see window.isSecureContext).

NOTE for Android: available Android 21.0+.

NOTE for Web: this method will have effect only if the iframe has the same origin. Returns false otherwise.

Officially Supported Platforms/Implementations:

Implementation

@override
Future<bool> isSecureContext() async {
  Map<String, dynamic> args = <String, dynamic>{};
  return await channel?.invokeMethod<bool>('isSecureContext', args) ?? false;
}