fixed settings fromMap methods

This commit is contained in:
Lorenzo Pichilli 2022-04-20 03:59:39 +02:00
parent c004325af7
commit 6fef6906a9
5 changed files with 222 additions and 214 deletions

View File

@ -1,18 +0,0 @@
#
# NOTE: This podspec is NOT to be published. It is only used as a local source!
# This is a generated file; do not edit or check into version control.
#
Pod::Spec.new do |s|
s.name = 'Flutter'
s.version = '1.0.0'
s.summary = 'High-performance, high-fidelity mobile apps.'
s.homepage = 'https://flutter.io'
s.license = { :type => 'MIT' }
s.author = { 'Flutter Dev Team' => 'flutter-dev@googlegroups.com' }
s.source = { :git => 'https://github.com/flutter/engine', :tag => s.version.to_s }
s.ios.deployment_target = '9.0'
# Framework linking is handled by Flutter tooling, not CocoaPods.
# Add a placeholder to satisfy `s.dependency 'Flutter'` plugin podspecs.
s.vendored_frameworks = 'path/to/nothing'
end

View File

@ -3,12 +3,11 @@
export "FLUTTER_ROOT=/Users/lorenzopichilli/fvm/versions/2.10.4" export "FLUTTER_ROOT=/Users/lorenzopichilli/fvm/versions/2.10.4"
export "FLUTTER_APPLICATION_PATH=/Users/lorenzopichilli/Desktop/flutter_inappwebview/example" export "FLUTTER_APPLICATION_PATH=/Users/lorenzopichilli/Desktop/flutter_inappwebview/example"
export "COCOAPODS_PARALLEL_CODE_SIGN=true" export "COCOAPODS_PARALLEL_CODE_SIGN=true"
export "FLUTTER_TARGET=/Users/lorenzopichilli/Desktop/flutter_inappwebview/example/lib/main.dart" export "FLUTTER_TARGET=lib/main.dart"
export "FLUTTER_BUILD_DIR=build" export "FLUTTER_BUILD_DIR=build"
export "FLUTTER_BUILD_NAME=1.0.0" export "FLUTTER_BUILD_NAME=1.0.0"
export "FLUTTER_BUILD_NUMBER=1" export "FLUTTER_BUILD_NUMBER=1"
export "DART_DEFINES=Zmx1dHRlci5pbnNwZWN0b3Iuc3RydWN0dXJlZEVycm9ycz10cnVl,RkxVVFRFUl9XRUJfQVVUT19ERVRFQ1Q9dHJ1ZQ=="
export "DART_OBFUSCATION=false" export "DART_OBFUSCATION=false"
export "TRACK_WIDGET_CREATION=true" export "TRACK_WIDGET_CREATION=false"
export "TREE_SHAKE_ICONS=false" export "TREE_SHAKE_ICONS=false"
export "PACKAGE_CONFIG=/Users/lorenzopichilli/Desktop/flutter_inappwebview/example/.dart_tool/package_config.json" export "PACKAGE_CONFIG=.packages"

View File

@ -1,3 +1,4 @@
import 'dart:io';
import 'dart:ui'; import 'dart:ui';
import 'package:flutter/foundation.dart'; import 'package:flutter/foundation.dart';
@ -225,31 +226,47 @@ class ChromeSafariBrowserSettings implements ChromeSafariBrowserOptions {
} }
static ChromeSafariBrowserSettings fromMap(Map<String, dynamic> map) { static ChromeSafariBrowserSettings fromMap(Map<String, dynamic> map) {
ChromeSafariBrowserSettings options = new ChromeSafariBrowserSettings(); ChromeSafariBrowserSettings settings = new ChromeSafariBrowserSettings();
options.shareState = map["shareState"]; if (Platform.isAndroid) {
options.showTitle = map["showTitle"]; settings.shareState = map["shareState"];
options.toolbarBackgroundColor = settings.showTitle = map["showTitle"];
settings.toolbarBackgroundColor =
UtilColor.fromHex(map["toolbarBackgroundColor"]); UtilColor.fromHex(map["toolbarBackgroundColor"]);
options.enableUrlBarHiding = map["enableUrlBarHiding"]; settings.enableUrlBarHiding = map["enableUrlBarHiding"];
options.instantAppsEnabled = map["instantAppsEnabled"]; settings.instantAppsEnabled = map["instantAppsEnabled"];
options.packageName = map["packageName"]; settings.packageName = map["packageName"];
options.keepAliveEnabled = map["keepAliveEnabled"]; settings.keepAliveEnabled = map["keepAliveEnabled"];
options.isSingleInstance = map["isSingleInstance"]; settings.isSingleInstance = map["isSingleInstance"];
options.noHistory = map["noHistory"]; settings.noHistory = map["noHistory"];
options.isTrustedWebActivity = map["isTrustedWebActivity"]; settings.isTrustedWebActivity = map["isTrustedWebActivity"];
options.additionalTrustedOrigins = map["additionalTrustedOrigins"]; settings.additionalTrustedOrigins = map["additionalTrustedOrigins"];
switch (map["displayMode"]["type"]) { switch (map["displayMode"]["type"]) {
case "IMMERSIVE_MODE": case "IMMERSIVE_MODE":
options.displayMode = settings.displayMode =
TrustedWebActivityImmersiveDisplayMode.fromMap(map["displayMode"]); TrustedWebActivityImmersiveDisplayMode.fromMap(map["displayMode"]);
break; break;
case "DEFAULT_MODE": case "DEFAULT_MODE":
default: default:
options.displayMode = TrustedWebActivityDefaultDisplayMode(); settings.displayMode = TrustedWebActivityDefaultDisplayMode();
break; break;
} }
options.screenOrientation = map["screenOrientation"]; settings.screenOrientation = map["screenOrientation"];
return options; }
if (Platform.isIOS || Platform.isMacOS) {
settings.entersReaderIfAvailable = map["entersReaderIfAvailable"];
settings.barCollapsingEnabled = map["barCollapsingEnabled"];
settings.dismissButtonStyle =
DismissButtonStyle.fromValue(map["dismissButtonStyle"])!;
settings.preferredBarTintColor =
UtilColor.fromHex(map["preferredBarTintColor"]);
settings.preferredControlTintColor =
UtilColor.fromHex(map["preferredControlTintColor"]);
settings.presentationStyle =
ModalPresentationStyle.fromValue(map["presentationStyle"])!;
settings.transitionStyle =
ModalTransitionStyle.fromValue(map["transitionStyle"])!;
}
return settings;
} }
@override @override

View File

@ -1,3 +1,4 @@
import 'dart:io';
import 'dart:ui'; import 'dart:ui';
import 'package:flutter/foundation.dart'; import 'package:flutter/foundation.dart';
@ -273,35 +274,39 @@ class InAppBrowserSettings
} }
static InAppBrowserSettings fromMap(Map<String, dynamic> map) { static InAppBrowserSettings fromMap(Map<String, dynamic> map) {
var instance = InAppBrowserSettings(); var settings = InAppBrowserSettings();
instance.hidden = map["hidden"]; settings.hidden = map["hidden"];
instance.hideToolbarTop = map["hideToolbarTop"]; settings.hideToolbarTop = map["hideToolbarTop"];
instance.toolbarTopBackgroundColor = settings.toolbarTopBackgroundColor =
UtilColor.fromHex(map["toolbarTopBackgroundColor"]); UtilColor.fromHex(map["toolbarTopBackgroundColor"]);
instance.hideUrlBar = map["hideUrlBar"]; settings.hideUrlBar = map["hideUrlBar"];
instance.hideProgressBar = map["hideProgressBar"]; settings.hideProgressBar = map["hideProgressBar"];
instance.hideTitleBar = map["hideTitleBar"]; if (Platform.isAndroid) {
instance.toolbarTopFixedTitle = map["toolbarTopFixedTitle"]; settings.hideTitleBar = map["hideTitleBar"];
instance.closeOnCannotGoBack = map["closeOnCannotGoBack"]; settings.toolbarTopFixedTitle = map["toolbarTopFixedTitle"];
instance.allowGoBackWithBackButton = map["allowGoBackWithBackButton"]; settings.closeOnCannotGoBack = map["closeOnCannotGoBack"];
instance.shouldCloseOnBackButtonPressed = settings.allowGoBackWithBackButton = map["allowGoBackWithBackButton"];
settings.shouldCloseOnBackButtonPressed =
map["shouldCloseOnBackButtonPressed"]; map["shouldCloseOnBackButtonPressed"];
instance.toolbarTopTranslucent = map["toolbarTopTranslucent"]; }
instance.toolbarTopTintColor = if (Platform.isIOS || Platform.isMacOS) {
settings.toolbarTopTranslucent = map["toolbarTopTranslucent"];
settings.toolbarTopTintColor =
UtilColor.fromHex(map["toolbarTopTintColor"]); UtilColor.fromHex(map["toolbarTopTintColor"]);
instance.hideToolbarBottom = map["hideToolbarBottom"]; settings.hideToolbarBottom = map["hideToolbarBottom"];
instance.toolbarBottomBackgroundColor = settings.toolbarBottomBackgroundColor =
UtilColor.fromHex(map["toolbarBottomBackgroundColor"]); UtilColor.fromHex(map["toolbarBottomBackgroundColor"]);
instance.toolbarBottomTintColor = settings.toolbarBottomTintColor =
UtilColor.fromHex(map["toolbarBottomTintColor"]); UtilColor.fromHex(map["toolbarBottomTintColor"]);
instance.toolbarBottomTranslucent = map["toolbarBottomTranslucent"]; settings.toolbarBottomTranslucent = map["toolbarBottomTranslucent"];
instance.closeButtonCaption = map["closeButtonCaption"]; settings.closeButtonCaption = map["closeButtonCaption"];
instance.closeButtonColor = UtilColor.fromHex(map["closeButtonColor"]); settings.closeButtonColor = UtilColor.fromHex(map["closeButtonColor"]);
instance.presentationStyle = settings.presentationStyle =
ModalPresentationStyle.fromValue(map["presentationStyle"])!; ModalPresentationStyle.fromValue(map["presentationStyle"])!;
instance.transitionStyle = settings.transitionStyle =
ModalTransitionStyle.fromValue(map["transitionStyle"])!; ModalTransitionStyle.fromValue(map["transitionStyle"])!;
return instance; }
return settings;
} }
@override @override

View File

@ -1,3 +1,4 @@
import 'dart:io';
import 'dart:ui'; import 'dart:ui';
import 'package:flutter/foundation.dart'; import 'package:flutter/foundation.dart';
@ -1232,153 +1233,157 @@ class InAppWebViewSettings
} }
}); });
var instance = InAppWebViewSettings(); var settings = InAppWebViewSettings();
instance.useShouldOverrideUrlLoading = map["useShouldOverrideUrlLoading"]; settings.useShouldOverrideUrlLoading = map["useShouldOverrideUrlLoading"];
instance.useOnLoadResource = map["useOnLoadResource"]; settings.useOnLoadResource = map["useOnLoadResource"];
instance.useOnDownloadStart = map["useOnDownloadStart"]; settings.useOnDownloadStart = map["useOnDownloadStart"];
instance.clearCache = map["clearCache"]; settings.clearCache = map["clearCache"];
instance.userAgent = map["userAgent"]; settings.userAgent = map["userAgent"];
instance.applicationNameForUserAgent = map["applicationNameForUserAgent"]; settings.applicationNameForUserAgent = map["applicationNameForUserAgent"];
instance.javaScriptEnabled = map["javaScriptEnabled"]; settings.javaScriptEnabled = map["javaScriptEnabled"];
instance.javaScriptCanOpenWindowsAutomatically = settings.javaScriptCanOpenWindowsAutomatically =
map["javaScriptCanOpenWindowsAutomatically"]; map["javaScriptCanOpenWindowsAutomatically"];
instance.mediaPlaybackRequiresUserGesture = settings.mediaPlaybackRequiresUserGesture =
map["mediaPlaybackRequiresUserGesture"]; map["mediaPlaybackRequiresUserGesture"];
instance.verticalScrollBarEnabled = map["verticalScrollBarEnabled"]; settings.verticalScrollBarEnabled = map["verticalScrollBarEnabled"];
instance.horizontalScrollBarEnabled = map["horizontalScrollBarEnabled"]; settings.horizontalScrollBarEnabled = map["horizontalScrollBarEnabled"];
instance.resourceCustomSchemes = settings.resourceCustomSchemes =
List<String>.from(map["resourceCustomSchemes"] ?? []); List<String>.from(map["resourceCustomSchemes"] ?? []);
instance.contentBlockers = contentBlockers; settings.contentBlockers = contentBlockers;
instance.preferredContentMode = settings.preferredContentMode =
UserPreferredContentMode.fromValue(map["preferredContentMode"]); UserPreferredContentMode.fromValue(map["preferredContentMode"]);
instance.useShouldInterceptAjaxRequest = settings.useShouldInterceptAjaxRequest =
map["useShouldInterceptAjaxRequest"]; map["useShouldInterceptAjaxRequest"];
instance.useShouldInterceptFetchRequest = settings.useShouldInterceptFetchRequest =
map["useShouldInterceptFetchRequest"]; map["useShouldInterceptFetchRequest"];
instance.incognito = map["incognito"]; settings.incognito = map["incognito"];
instance.cacheEnabled = map["cacheEnabled"]; settings.cacheEnabled = map["cacheEnabled"];
instance.transparentBackground = map["transparentBackground"]; settings.transparentBackground = map["transparentBackground"];
instance.disableVerticalScroll = map["disableVerticalScroll"]; settings.disableVerticalScroll = map["disableVerticalScroll"];
instance.disableHorizontalScroll = map["disableHorizontalScroll"]; settings.disableHorizontalScroll = map["disableHorizontalScroll"];
instance.disableContextMenu = map["disableContextMenu"]; settings.disableContextMenu = map["disableContextMenu"];
instance.supportZoom = map["supportZoom"]; settings.supportZoom = map["supportZoom"];
instance.allowFileAccessFromFileURLs = map["allowFileAccessFromFileURLs"]; settings.allowFileAccessFromFileURLs = map["allowFileAccessFromFileURLs"];
instance.allowUniversalAccessFromFileURLs = settings.allowUniversalAccessFromFileURLs =
map["allowUniversalAccessFromFileURLs"]; map["allowUniversalAccessFromFileURLs"];
instance.textZoom = map["textZoom"]; if (Platform.isAndroid) {
instance.clearSessionCache = map["clearSessionCache"]; settings.textZoom = map["textZoom"];
instance.builtInZoomControls = map["builtInZoomControls"]; settings.clearSessionCache = map["clearSessionCache"];
instance.displayZoomControls = map["displayZoomControls"]; settings.builtInZoomControls = map["builtInZoomControls"];
instance.databaseEnabled = map["databaseEnabled"]; settings.displayZoomControls = map["displayZoomControls"];
instance.domStorageEnabled = map["domStorageEnabled"]; settings.databaseEnabled = map["databaseEnabled"];
instance.useWideViewPort = map["useWideViewPort"]; settings.domStorageEnabled = map["domStorageEnabled"];
instance.safeBrowsingEnabled = map["safeBrowsingEnabled"]; settings.useWideViewPort = map["useWideViewPort"];
instance.mixedContentMode = settings.safeBrowsingEnabled = map["safeBrowsingEnabled"];
settings.mixedContentMode =
MixedContentMode.fromValue(map["mixedContentMode"]); MixedContentMode.fromValue(map["mixedContentMode"]);
instance.allowContentAccess = map["allowContentAccess"]; settings.allowContentAccess = map["allowContentAccess"];
instance.allowFileAccess = map["allowFileAccess"]; settings.allowFileAccess = map["allowFileAccess"];
instance.appCachePath = map["appCachePath"]; settings.appCachePath = map["appCachePath"];
instance.blockNetworkImage = map["blockNetworkImage"]; settings.blockNetworkImage = map["blockNetworkImage"];
instance.blockNetworkLoads = map["blockNetworkLoads"]; settings.blockNetworkLoads = map["blockNetworkLoads"];
instance.cacheMode = CacheMode.fromValue(map["cacheMode"]); settings.cacheMode = CacheMode.fromValue(map["cacheMode"]);
instance.cursiveFontFamily = map["cursiveFontFamily"]; settings.cursiveFontFamily = map["cursiveFontFamily"];
instance.defaultFixedFontSize = map["defaultFixedFontSize"]; settings.defaultFixedFontSize = map["defaultFixedFontSize"];
instance.defaultFontSize = map["defaultFontSize"]; settings.defaultFontSize = map["defaultFontSize"];
instance.defaultTextEncodingName = map["defaultTextEncodingName"]; settings.defaultTextEncodingName = map["defaultTextEncodingName"];
instance.disabledActionModeMenuItems = settings.disabledActionModeMenuItems =
ActionModeMenuItem.fromValue(map["disabledActionModeMenuItems"]); ActionModeMenuItem.fromValue(map["disabledActionModeMenuItems"]);
instance.fantasyFontFamily = map["fantasyFontFamily"]; settings.fantasyFontFamily = map["fantasyFontFamily"];
instance.fixedFontFamily = map["fixedFontFamily"]; settings.fixedFontFamily = map["fixedFontFamily"];
instance.forceDark = ForceDark.fromValue(map["forceDark"]); settings.forceDark = ForceDark.fromValue(map["forceDark"]);
instance.geolocationEnabled = map["geolocationEnabled"]; settings.geolocationEnabled = map["geolocationEnabled"];
instance.layoutAlgorithm = settings.layoutAlgorithm =
LayoutAlgorithm.fromValue(map["layoutAlgorithm"]); LayoutAlgorithm.fromValue(map["layoutAlgorithm"]);
instance.loadWithOverviewMode = map["loadWithOverviewMode"]; settings.loadWithOverviewMode = map["loadWithOverviewMode"];
instance.loadsImagesAutomatically = map["loadsImagesAutomatically"]; settings.loadsImagesAutomatically = map["loadsImagesAutomatically"];
instance.minimumLogicalFontSize = map["minimumLogicalFontSize"]; settings.minimumLogicalFontSize = map["minimumLogicalFontSize"];
instance.initialScale = map["initialScale"]; settings.initialScale = map["initialScale"];
instance.needInitialFocus = map["needInitialFocus"]; settings.needInitialFocus = map["needInitialFocus"];
instance.offscreenPreRaster = map["offscreenPreRaster"]; settings.offscreenPreRaster = map["offscreenPreRaster"];
instance.sansSerifFontFamily = map["sansSerifFontFamily"]; settings.sansSerifFontFamily = map["sansSerifFontFamily"];
instance.serifFontFamily = map["serifFontFamily"]; settings.serifFontFamily = map["serifFontFamily"];
instance.standardFontFamily = map["standardFontFamily"]; settings.standardFontFamily = map["standardFontFamily"];
instance.saveFormData = map["saveFormData"]; settings.saveFormData = map["saveFormData"];
instance.thirdPartyCookiesEnabled = map["thirdPartyCookiesEnabled"]; settings.thirdPartyCookiesEnabled = map["thirdPartyCookiesEnabled"];
instance.hardwareAcceleration = map["hardwareAcceleration"]; settings.hardwareAcceleration = map["hardwareAcceleration"];
instance.supportMultipleWindows = map["supportMultipleWindows"]; settings.supportMultipleWindows = map["supportMultipleWindows"];
instance.regexToCancelSubFramesLoading = settings.regexToCancelSubFramesLoading =
map["regexToCancelSubFramesLoading"]; map["regexToCancelSubFramesLoading"];
instance.useHybridComposition = map["useHybridComposition"]; settings.useHybridComposition = map["useHybridComposition"];
instance.useShouldInterceptRequest = map["useShouldInterceptRequest"]; settings.useShouldInterceptRequest = map["useShouldInterceptRequest"];
instance.useOnRenderProcessGone = map["useOnRenderProcessGone"]; settings.useOnRenderProcessGone = map["useOnRenderProcessGone"];
instance.overScrollMode = OverScrollMode.fromValue(map["overScrollMode"]); settings.overScrollMode = OverScrollMode.fromValue(map["overScrollMode"]);
instance.networkAvailable = map["networkAvailable"]; settings.networkAvailable = map["networkAvailable"];
instance.scrollBarStyle = ScrollBarStyle.fromValue(map["scrollBarStyle"]); settings.scrollBarStyle = ScrollBarStyle.fromValue(map["scrollBarStyle"]);
instance.verticalScrollbarPosition = settings.verticalScrollbarPosition =
VerticalScrollbarPosition.fromValue(map["verticalScrollbarPosition"]); VerticalScrollbarPosition.fromValue(map["verticalScrollbarPosition"]);
instance.scrollBarDefaultDelayBeforeFade = settings.scrollBarDefaultDelayBeforeFade =
map["scrollBarDefaultDelayBeforeFade"]; map["scrollBarDefaultDelayBeforeFade"];
instance.scrollbarFadingEnabled = map["scrollbarFadingEnabled"]; settings.scrollbarFadingEnabled = map["scrollbarFadingEnabled"];
instance.scrollBarFadeDuration = map["scrollBarFadeDuration"]; settings.scrollBarFadeDuration = map["scrollBarFadeDuration"];
instance.rendererPriorityPolicy = RendererPriorityPolicy.fromMap( settings.rendererPriorityPolicy = RendererPriorityPolicy.fromMap(
map["rendererPriorityPolicy"]?.cast<String, dynamic>()); map["rendererPriorityPolicy"]?.cast<String, dynamic>());
instance.disableDefaultErrorPage = map["disableDefaultErrorPage"]; settings.disableDefaultErrorPage = map["disableDefaultErrorPage"];
instance.verticalScrollbarThumbColor = settings.verticalScrollbarThumbColor =
UtilColor.fromHex(map["verticalScrollbarThumbColor"]); UtilColor.fromHex(map["verticalScrollbarThumbColor"]);
instance.verticalScrollbarTrackColor = settings.verticalScrollbarTrackColor =
UtilColor.fromHex(map["verticalScrollbarTrackColor"]); UtilColor.fromHex(map["verticalScrollbarTrackColor"]);
instance.horizontalScrollbarThumbColor = settings.horizontalScrollbarThumbColor =
UtilColor.fromHex(map["horizontalScrollbarThumbColor"]); UtilColor.fromHex(map["horizontalScrollbarThumbColor"]);
instance.horizontalScrollbarTrackColor = settings.horizontalScrollbarTrackColor =
UtilColor.fromHex(map["horizontalScrollbarTrackColor"]); UtilColor.fromHex(map["horizontalScrollbarTrackColor"]);
instance.disallowOverScroll = map["disallowOverScroll"]; }
instance.enableViewportScale = map["enableViewportScale"]; if (Platform.isIOS || Platform.isMacOS) {
instance.suppressesIncrementalRendering = settings.disallowOverScroll = map["disallowOverScroll"];
settings.enableViewportScale = map["enableViewportScale"];
settings.suppressesIncrementalRendering =
map["suppressesIncrementalRendering"]; map["suppressesIncrementalRendering"];
instance.allowsAirPlayForMediaPlayback = settings.allowsAirPlayForMediaPlayback =
map["allowsAirPlayForMediaPlayback"]; map["allowsAirPlayForMediaPlayback"];
instance.allowsBackForwardNavigationGestures = settings.allowsBackForwardNavigationGestures =
map["allowsBackForwardNavigationGestures"]; map["allowsBackForwardNavigationGestures"];
instance.allowsLinkPreview = map["allowsLinkPreview"]; settings.allowsLinkPreview = map["allowsLinkPreview"];
instance.ignoresViewportScaleLimits = map["ignoresViewportScaleLimits"]; settings.ignoresViewportScaleLimits = map["ignoresViewportScaleLimits"];
instance.allowsInlineMediaPlayback = map["allowsInlineMediaPlayback"]; settings.allowsInlineMediaPlayback = map["allowsInlineMediaPlayback"];
instance.allowsPictureInPictureMediaPlayback = settings.allowsPictureInPictureMediaPlayback =
map["allowsPictureInPictureMediaPlayback"]; map["allowsPictureInPictureMediaPlayback"];
instance.isFraudulentWebsiteWarningEnabled = settings.isFraudulentWebsiteWarningEnabled =
map["isFraudulentWebsiteWarningEnabled"]; map["isFraudulentWebsiteWarningEnabled"];
instance.selectionGranularity = settings.selectionGranularity =
SelectionGranularity.fromValue(map["selectionGranularity"])!; SelectionGranularity.fromValue(map["selectionGranularity"])!;
instance.dataDetectorTypes = dataDetectorTypes; settings.dataDetectorTypes = dataDetectorTypes;
instance.sharedCookiesEnabled = map["sharedCookiesEnabled"]; settings.sharedCookiesEnabled = map["sharedCookiesEnabled"];
instance.automaticallyAdjustsScrollIndicatorInsets = settings.automaticallyAdjustsScrollIndicatorInsets =
map["automaticallyAdjustsScrollIndicatorInsets"]; map["automaticallyAdjustsScrollIndicatorInsets"];
instance.accessibilityIgnoresInvertColors = settings.accessibilityIgnoresInvertColors =
map["accessibilityIgnoresInvertColors"]; map["accessibilityIgnoresInvertColors"];
instance.decelerationRate = settings.decelerationRate =
ScrollViewDecelerationRate.fromValue(map["decelerationRate"])!; ScrollViewDecelerationRate.fromValue(map["decelerationRate"])!;
instance.alwaysBounceVertical = map["alwaysBounceVertical"]; settings.alwaysBounceVertical = map["alwaysBounceVertical"];
instance.alwaysBounceHorizontal = map["alwaysBounceHorizontal"]; settings.alwaysBounceHorizontal = map["alwaysBounceHorizontal"];
instance.scrollsToTop = map["scrollsToTop"]; settings.scrollsToTop = map["scrollsToTop"];
instance.isPagingEnabled = map["isPagingEnabled"]; settings.isPagingEnabled = map["isPagingEnabled"];
instance.maximumZoomScale = map["maximumZoomScale"]; settings.maximumZoomScale = map["maximumZoomScale"];
instance.minimumZoomScale = map["minimumZoomScale"]; settings.minimumZoomScale = map["minimumZoomScale"];
instance.contentInsetAdjustmentBehavior = settings.contentInsetAdjustmentBehavior =
ScrollViewContentInsetAdjustmentBehavior.fromValue( ScrollViewContentInsetAdjustmentBehavior.fromValue(
map["contentInsetAdjustmentBehavior"])!; map["contentInsetAdjustmentBehavior"])!;
instance.isDirectionalLockEnabled = map["isDirectionalLockEnabled"]; settings.isDirectionalLockEnabled = map["isDirectionalLockEnabled"];
instance.mediaType = map["mediaType"]; settings.mediaType = map["mediaType"];
instance.pageZoom = map["pageZoom"]; settings.pageZoom = map["pageZoom"];
instance.limitsNavigationsToAppBoundDomains = settings.limitsNavigationsToAppBoundDomains =
map["limitsNavigationsToAppBoundDomains"]; map["limitsNavigationsToAppBoundDomains"];
instance.useOnNavigationResponse = map["useOnNavigationResponse"]; settings.useOnNavigationResponse = map["useOnNavigationResponse"];
instance.applePayAPIEnabled = map["applePayAPIEnabled"]; settings.applePayAPIEnabled = map["applePayAPIEnabled"];
instance.allowingReadAccessTo = map["allowingReadAccessTo"] != null settings.allowingReadAccessTo = map["allowingReadAccessTo"] != null
? Uri.parse(map["allowingReadAccessTo"]) ? Uri.parse(map["allowingReadAccessTo"])
: null; : null;
instance.disableLongPressContextMenuOnLinks = settings.disableLongPressContextMenuOnLinks =
map["disableLongPressContextMenuOnLinks"]; map["disableLongPressContextMenuOnLinks"];
instance.disableInputAccessoryView = map["disableInputAccessoryView"]; settings.disableInputAccessoryView = map["disableInputAccessoryView"];
return instance; }
return settings;
} }
@override @override