onNavigationResponse method
Called when a web view asks for permission to navigate to new content after the response to the navigation request is known.
navigationResponse represents the navigation response.
NOTE: In order to be able to listen this event, check the InAppWebViewSettings.useOnNavigationResponse setting documentation.
Officially Supported Platforms/Implementations:
- iOS WKWebView (Official API - WKNavigationDelegate.webView)
- macOS WKWebView (Official API - WKNavigationDelegate.webView)
Parameters - Officially Supported Platforms/Implementations:
navigationResponse: all platforms
Use the PlatformInAppBrowserEvents.isMethodSupported method to check if this method is supported at runtime.
Implementation
@override
FutureOr<NavigationResponseAction?>? onNavigationResponse(
NavigationResponse navigationResponse,
) {
return null;
}