startSafeBrowsing method Null safety

Future<bool> startSafeBrowsing()

Starts Safe Browsing initialization.

URL loads are not guaranteed to be protected by Safe Browsing until after the this method returns true. Safe Browsing is not fully supported on all devices. For those devices this method will returns false.

This should not be called if Safe Browsing has been disabled by manifest tag or AndroidInAppWebViewOptions.safeBrowsingEnabled. This prepares resources used for Safe Browsing.

This method should only be called if AndroidWebViewFeature.isFeatureSupported returns true for AndroidWebViewFeature.START_SAFE_BROWSING.

Official Android API: https://developer.android.com/reference/android/webkit/WebView#startSafeBrowsing(android.content.Context,%20android.webkit.ValueCallback%3Cjava.lang.Boolean%3E)

Implementation

Future<bool> startSafeBrowsing() async {
  Map<String, dynamic> args = <String, dynamic>{};
  return await _channel.invokeMethod('startSafeBrowsing', args);
}