onNavigationResponse method

  1. @override
FutureOr<NavigationResponseAction?>? onNavigationResponse(
  1. NavigationResponse navigationResponse
)
inherited

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:

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;
}