fromMap static method

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

Gets a possible CreateWindowAction instance from a Map value.

Implementation

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