shouldOverrideUrlLoading method

  1. @override
FutureOr<NavigationActionPolicy?>? shouldOverrideUrlLoading(
  1. NavigationAction navigationAction
)
override

Give the host application a chance to take control when a URL is about to be loaded in the current WebView.

navigationAction represents an object that contains information about an action that causes navigation to occur.

NOTE: In order to be able to listen this event, check the InAppWebViewSettings.useShouldOverrideUrlLoading setting documentation.

Officially Supported Platforms/Implementations:

Parameters - Officially Supported Platforms/Implementations:

  • navigationAction: all platforms

Use the PlatformInAppBrowserEvents.isMethodSupported method to check if this method is supported at runtime.

Implementation

@override
FutureOr<NavigationActionPolicy?>? shouldOverrideUrlLoading(
  NavigationAction navigationAction,
) {
  return null;
}