NavigationDelegate constructor
NavigationDelegate({
- void onPageStarted(
- String url
- void onPageFinished(
- String url
- void onProgress(
- int progress
- void onWebResourceError(
- WebResourceError error
- void onUrlChange(
- UrlChange change
- void onHttpAuthRequest(
- HttpAuthRequest request
- void onHttpError(
- HttpResponseError error
- void onSslAuthError(
- SslAuthError request
Constructs a NavigationDelegate.
onNavigationRequest: invoked when a navigation request is pending.
onPageStarted: invoked when a page starts loading.
onPageFinished: invoked when a page finishes loading.
onProgress: invoked when page loading progress changes.
onWebResourceError: invoked when a web resource loading error occurs.
onUrlChange: invoked when the underlying web view changes to a new URL.
onHttpAuthRequest: invoked when the web view is requesting authentication.
onHttpError: invoked when an HTTP error status code is received.
onSslAuthError: invoked when the web view receives a recoverable SSL
error for a certificate. The host application must call either
SslAuthError.cancel or SslAuthError.proceed.
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,
void Function(SslAuthError request)? onSslAuthError,
}) : this.fromPlatformCreationParams(
const PlatformNavigationDelegateCreationParams(),
onNavigationRequest: onNavigationRequest,
onPageStarted: onPageStarted,
onPageFinished: onPageFinished,
onProgress: onProgress,
onWebResourceError: onWebResourceError,
onUrlChange: onUrlChange,
onHttpAuthRequest: onHttpAuthRequest,
onHttpError: onHttpError,
onSslAuthError: onSslAuthError,
);