fromMap static method

NavigationAction? fromMap(
  1. Map<String, dynamic>? map
)

Gets a possible NavigationAction instance from a Map value.

Implementation

static NavigationAction? fromMap(Map<String, dynamic>? map) {
  if (map == null) {
    return null;
  }
  final instance = NavigationAction(
    androidHasGesture: map['hasGesture'],
    androidIsRedirect: map['isRedirect'],
    hasGesture: map['hasGesture'],
    iosSourceFrame:
        IOSWKFrameInfo.fromMap(map['sourceFrame']?.cast<String, dynamic>()),
    iosTargetFrame:
        IOSWKFrameInfo.fromMap(map['targetFrame']?.cast<String, dynamic>()),
    iosWKNavigationType:
        IOSWKNavigationType.fromNativeValue(map['navigationType']),
    isForMainFrame: map['isForMainFrame'],
    isRedirect: map['isRedirect'],
    navigationType: NavigationType.fromNativeValue(map['navigationType']),
    request: URLRequest.fromMap(map['request']?.cast<String, dynamic>())!,
    shouldPerformDownload: map['shouldPerformDownload'],
    sourceFrame:
        FrameInfo.fromMap(map['sourceFrame']?.cast<String, dynamic>()),
    targetFrame:
        FrameInfo.fromMap(map['targetFrame']?.cast<String, dynamic>()),
  );
  return instance;
}