onSafeBrowsingHit method
FutureOr<SafeBrowsingResponse?> ?
onSafeBrowsingHit(
- WebUri url,
- SafeBrowsingThreat? threatType
inherited
Event fired when the webview notifies that a loading URL has been flagged by Safe Browsing. The default behavior is to show an interstitial to the user, with the reporting checkbox visible.
url represents the url of the request.
threatType represents the reason the resource was caught by Safe Browsing, corresponding to a SafeBrowsingThreat.
Officially Supported Platforms/Implementations:
- Android WebView 27+ (Official API - WebViewClient.onSafeBrowsingHit)
Parameters - Officially Supported Platforms/Implementations:
url: all platformsthreatType: all platforms
Use the PlatformInAppBrowserEvents.isMethodSupported method to check if this method is supported at runtime.
Implementation
@override
FutureOr<SafeBrowsingResponse?>? onSafeBrowsingHit(
WebUri url,
SafeBrowsingThreat? threatType,
) {
return null;
}