isSecureContext method
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:
- Android native WebView
- iOS
- MacOS
- Web (Official API - Window.isSecureContext)
Implementation
@override
Future<bool> isSecureContext() async {
Map<String, dynamic> args = <String, dynamic>{};
return await channel?.invokeMethod<bool>('isSecureContext', args) ?? false;
}