NavigationAction constructor

NavigationAction({
  1. @Deprecated('Use hasGesture instead') bool? androidHasGesture,
  2. @Deprecated('Use isRedirect instead') bool? androidIsRedirect,
  3. bool? hasGesture,
  4. @Deprecated('Use sourceFrame instead') IOSWKFrameInfo? iosSourceFrame,
  5. @Deprecated('Use targetFrame instead') IOSWKFrameInfo? iosTargetFrame,
  6. @Deprecated('Use navigationType instead') IOSWKNavigationType? iosWKNavigationType,
  7. required bool isForMainFrame,
  8. bool? isRedirect,
  9. NavigationType? navigationType,
  10. required URLRequest request,
  11. bool? shouldPerformDownload,
  12. FrameInfo? sourceFrame,
  13. 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());
}