fromMap method Null safety

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

Implementation

static AndroidInAppWebViewOptions fromMap(Map<String, dynamic> map) {
  AndroidInAppWebViewOptions options = AndroidInAppWebViewOptions();
  options.textZoom = map["textZoom"];
  options.clearSessionCache = map["clearSessionCache"];
  options.builtInZoomControls = map["builtInZoomControls"];
  options.displayZoomControls = map["displayZoomControls"];
  options.databaseEnabled = map["databaseEnabled"];
  options.domStorageEnabled = map["domStorageEnabled"];
  options.useWideViewPort = map["useWideViewPort"];
  options.safeBrowsingEnabled = map["safeBrowsingEnabled"];
  options.mixedContentMode =
      AndroidMixedContentMode.fromValue(map["mixedContentMode"]);
  options.allowContentAccess = map["allowContentAccess"];
  options.allowFileAccess = map["allowFileAccess"];
  options.appCachePath = map["appCachePath"];
  options.blockNetworkImage = map["blockNetworkImage"];
  options.blockNetworkLoads = map["blockNetworkLoads"];
  options.cacheMode = AndroidCacheMode.fromValue(map["cacheMode"]);
  options.cursiveFontFamily = map["cursiveFontFamily"];
  options.defaultFixedFontSize = map["defaultFixedFontSize"];
  options.defaultFontSize = map["defaultFontSize"];
  options.defaultTextEncodingName = map["defaultTextEncodingName"];
  options.disabledActionModeMenuItems =
      AndroidActionModeMenuItem.fromValue(map["disabledActionModeMenuItems"]);
  options.fantasyFontFamily = map["fantasyFontFamily"];
  options.fixedFontFamily = map["fixedFontFamily"];
  options.forceDark = AndroidForceDark.fromValue(map["forceDark"]);
  options.geolocationEnabled = map["geolocationEnabled"];
  options.layoutAlgorithm =
      AndroidLayoutAlgorithm.fromValue(map["layoutAlgorithm"]);
  options.loadWithOverviewMode = map["loadWithOverviewMode"];
  options.loadsImagesAutomatically = map["loadsImagesAutomatically"];
  options.minimumLogicalFontSize = map["minimumLogicalFontSize"];
  options.initialScale = map["initialScale"];
  options.needInitialFocus = map["needInitialFocus"];
  options.offscreenPreRaster = map["offscreenPreRaster"];
  options.sansSerifFontFamily = map["sansSerifFontFamily"];
  options.serifFontFamily = map["serifFontFamily"];
  options.standardFontFamily = map["standardFontFamily"];
  options.saveFormData = map["saveFormData"];
  options.thirdPartyCookiesEnabled = map["thirdPartyCookiesEnabled"];
  options.hardwareAcceleration = map["hardwareAcceleration"];
  options.supportMultipleWindows = map["supportMultipleWindows"];
  options.regexToCancelSubFramesLoading =
      map["regexToCancelSubFramesLoading"];
  options.useHybridComposition = map["useHybridComposition"];
  options.useShouldInterceptRequest = map["useShouldInterceptRequest"];
  options.useOnRenderProcessGone = map["useOnRenderProcessGone"];
  options.overScrollMode =
      AndroidOverScrollMode.fromValue(map["overScrollMode"]);
  options.networkAvailable = map["networkAvailable"];
  options.scrollBarStyle =
      AndroidScrollBarStyle.fromValue(map["scrollBarStyle"]);
  options.verticalScrollbarPosition =
      AndroidVerticalScrollbarPosition.fromValue(
          map["verticalScrollbarPosition"]);
  options.scrollBarDefaultDelayBeforeFade =
      map["scrollBarDefaultDelayBeforeFade"];
  options.scrollbarFadingEnabled = map["scrollbarFadingEnabled"];
  options.scrollBarFadeDuration = map["scrollBarFadeDuration"];
  options.rendererPriorityPolicy = RendererPriorityPolicy.fromMap(
      map["rendererPriorityPolicy"]?.cast<String, dynamic>());
  options.disableDefaultErrorPage = map["disableDefaultErrorPage"];
  options.verticalScrollbarThumbColor =
      UtilColor.fromHex(map["verticalScrollbarThumbColor"]);
  options.verticalScrollbarTrackColor =
      UtilColor.fromHex(map["verticalScrollbarTrackColor"]);
  options.horizontalScrollbarThumbColor =
      UtilColor.fromHex(map["horizontalScrollbarThumbColor"]);
  options.horizontalScrollbarTrackColor =
      UtilColor.fromHex(map["horizontalScrollbarTrackColor"]);
  return options;
}