NavigationDelegate constructor

NavigationDelegate({
  1. FutureOr<NavigationDecision> onNavigationRequest(
    1. NavigationRequest request
    )?,
  2. void onPageStarted(
    1. String url
    )?,
  3. void onPageFinished(
    1. String url
    )?,
  4. void onProgress(
    1. int progress
    )?,
  5. void onWebResourceError(
    1. WebResourceError error
    )?,
  6. void onUrlChange(
    1. UrlChange change
    )?,
  7. void onHttpAuthRequest(
    1. HttpAuthRequest request
    )?,
  8. void onHttpError(
    1. HttpResponseError error
    )?,
})

Constructs a NavigationDelegate.

onUrlChange: invoked when the underlying web view changes to a new url. onHttpAuthRequest: invoked when the web view is requesting authentication.

Implementation

NavigationDelegate({
  FutureOr<NavigationDecision> Function(NavigationRequest request)?
      onNavigationRequest,
  void Function(String url)? onPageStarted,
  void Function(String url)? onPageFinished,
  void Function(int progress)? onProgress,
  void Function(WebResourceError error)? onWebResourceError,
  void Function(UrlChange change)? onUrlChange,
  void Function(HttpAuthRequest request)? onHttpAuthRequest,
  void Function(HttpResponseError error)? onHttpError,
}) : this.fromPlatformCreationParams(
        const PlatformNavigationDelegateCreationParams(),
        onNavigationRequest: onNavigationRequest,
        onPageStarted: onPageStarted,
        onPageFinished: onPageFinished,
        onProgress: onProgress,
        onWebResourceError: onWebResourceError,
        onUrlChange: onUrlChange,
        onHttpAuthRequest: onHttpAuthRequest,
        onHttpError: onHttpError,
      );