NavigationAction constructor
NavigationAction({
- @Deprecated('Use hasGesture instead') bool? androidHasGesture,
- @Deprecated('Use isRedirect instead') bool? androidIsRedirect,
- bool? hasGesture,
- @Deprecated('Use sourceFrame instead') IOSWKFrameInfo? iosSourceFrame,
- @Deprecated('Use targetFrame instead') IOSWKFrameInfo? iosTargetFrame,
- required bool isForMainFrame,
- bool? isRedirect,
- required URLRequest request,
- bool? shouldPerformDownload,
- FrameInfo? sourceFrame,
- FrameInfo? targetFrame,
Implementation
NavigationAction(
{@Deprecated('Use hasGesture instead') this.androidHasGesture,
@Deprecated('Use isRedirect instead') this.androidIsRedirect,
this.hasGesture,
@Deprecated('Use sourceFrame instead') this.iosSourceFrame,
@Deprecated('Use targetFrame instead') this.iosTargetFrame,
@Deprecated('Use navigationType instead') this.iosWKNavigationType,
required this.isForMainFrame,
this.isRedirect,
this.navigationType,
required this.request,
this.shouldPerformDownload,
this.sourceFrame,
this.targetFrame}) {
hasGesture = hasGesture ?? androidHasGesture;
isRedirect = isRedirect ?? androidIsRedirect;
sourceFrame = sourceFrame ?? FrameInfo.fromMap(iosSourceFrame?.toMap());
targetFrame = targetFrame ?? FrameInfo.fromMap(iosTargetFrame?.toMap());
navigationType = navigationType ??
NavigationType.fromNativeValue(iosWKNavigationType?.toNativeValue());
}