fromMap static method
Implementation
static IOSInAppWebViewOptions fromMap(Map<String, dynamic> map) {
List<IOSWKDataDetectorTypes> dataDetectorTypes = [];
List<String> dataDetectorTypesList =
List<String>.from(map["dataDetectorTypes"] ?? []);
dataDetectorTypesList.forEach((dataDetectorTypeValue) {
var dataDetectorType =
IOSWKDataDetectorTypes.fromValue(dataDetectorTypeValue);
if (dataDetectorType != null) {
dataDetectorTypes.add(dataDetectorType);
}
});
IOSInAppWebViewOptions options = IOSInAppWebViewOptions();
options.disallowOverScroll = map["disallowOverScroll"];
options.enableViewportScale = map["enableViewportScale"];
options.suppressesIncrementalRendering =
map["suppressesIncrementalRendering"];
options.allowsAirPlayForMediaPlayback =
map["allowsAirPlayForMediaPlayback"];
options.allowsBackForwardNavigationGestures =
map["allowsBackForwardNavigationGestures"];
options.allowsLinkPreview = map["allowsLinkPreview"];
options.ignoresViewportScaleLimits = map["ignoresViewportScaleLimits"];
options.allowsInlineMediaPlayback = map["allowsInlineMediaPlayback"];
options.allowsPictureInPictureMediaPlayback =
map["allowsPictureInPictureMediaPlayback"];
options.isFraudulentWebsiteWarningEnabled =
map["isFraudulentWebsiteWarningEnabled"];
options.selectionGranularity =
IOSWKSelectionGranularity.fromValue(map["selectionGranularity"])!;
options.dataDetectorTypes = dataDetectorTypes;
options.sharedCookiesEnabled = map["sharedCookiesEnabled"];
options.automaticallyAdjustsScrollIndicatorInsets =
map["automaticallyAdjustsScrollIndicatorInsets"];
options.accessibilityIgnoresInvertColors =
map["accessibilityIgnoresInvertColors"];
options.decelerationRate =
IOSUIScrollViewDecelerationRate.fromValue(map["decelerationRate"])!;
options.alwaysBounceVertical = map["alwaysBounceVertical"];
options.alwaysBounceHorizontal = map["alwaysBounceHorizontal"];
options.scrollsToTop = map["scrollsToTop"];
options.isPagingEnabled = map["isPagingEnabled"];
options.maximumZoomScale = map["maximumZoomScale"];
options.minimumZoomScale = map["minimumZoomScale"];
options.contentInsetAdjustmentBehavior =
IOSUIScrollViewContentInsetAdjustmentBehavior.fromValue(
map["contentInsetAdjustmentBehavior"])!;
options.isDirectionalLockEnabled = map["isDirectionalLockEnabled"];
options.mediaType = map["mediaType"];
options.pageZoom = map["pageZoom"];
options.limitsNavigationsToAppBoundDomains =
map["limitsNavigationsToAppBoundDomains"];
options.useOnNavigationResponse = map["useOnNavigationResponse"];
options.applePayAPIEnabled = map["applePayAPIEnabled"];
options.allowingReadAccessTo = map["allowingReadAccessTo"] != null
? Uri.tryParse(map["allowingReadAccessTo"])
: null;
options.disableLongPressContextMenuOnLinks =
map["disableLongPressContextMenuOnLinks"];
options.disableInputAccessoryView = map["disableInputAccessoryView"];
return options;
}