NavigationDelegate.fromPlatform constructor
NavigationDelegate.fromPlatform(
- PlatformNavigationDelegate platform, {
- PageEventCallback? onPageStarted,
- PageEventCallback? onPageFinished,
- ProgressCallback? onProgress,
- WebResourceErrorCallback? onWebResourceError,
Constructs a NavigationDelegate from a specific platform implementation.
Implementation
NavigationDelegate.fromPlatform(
this.platform, {
this.onNavigationRequest,
this.onPageStarted,
this.onPageFinished,
this.onProgress,
this.onWebResourceError,
}) {
if (onNavigationRequest != null) {
platform.setOnNavigationRequest(onNavigationRequest!);
}
if (onPageStarted != null) {
platform.setOnPageStarted(onPageStarted!);
}
if (onPageFinished != null) {
platform.setOnPageFinished(onPageFinished!);
}
if (onProgress != null) {
platform.setOnProgress(onProgress!);
}
if (onWebResourceError != null) {
platform.setOnWebResourceError(onWebResourceError!);
}
}