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.fromNativeValue(dataDetectorTypeValue);
if (dataDetectorType != null) {
dataDetectorTypes.add(dataDetectorType);
}
});
var instance = IOSInAppWebViewOptions();
instance.disallowOverScroll = map["disallowOverScroll"];
instance.enableViewportScale = map["enableViewportScale"];
instance.suppressesIncrementalRendering =
map["suppressesIncrementalRendering"];
instance.allowsAirPlayForMediaPlayback =
map["allowsAirPlayForMediaPlayback"];
instance.allowsBackForwardNavigationGestures =
map["allowsBackForwardNavigationGestures"];
instance.allowsLinkPreview = map["allowsLinkPreview"];
instance.ignoresViewportScaleLimits = map["ignoresViewportScaleLimits"];
instance.allowsInlineMediaPlayback = map["allowsInlineMediaPlayback"];
instance.allowsPictureInPictureMediaPlayback =
map["allowsPictureInPictureMediaPlayback"];
instance.isFraudulentWebsiteWarningEnabled =
map["isFraudulentWebsiteWarningEnabled"];
instance.selectionGranularity =
IOSWKSelectionGranularity.fromNativeValue(map["selectionGranularity"])!;
instance.dataDetectorTypes = dataDetectorTypes;
instance.sharedCookiesEnabled = map["sharedCookiesEnabled"];
instance.automaticallyAdjustsScrollIndicatorInsets =
map["automaticallyAdjustsScrollIndicatorInsets"];
instance.accessibilityIgnoresInvertColors =
map["accessibilityIgnoresInvertColors"];
instance.decelerationRate = IOSUIScrollViewDecelerationRate.fromNativeValue(
map["decelerationRate"])!;
instance.alwaysBounceVertical = map["alwaysBounceVertical"];
instance.alwaysBounceHorizontal = map["alwaysBounceHorizontal"];
instance.scrollsToTop = map["scrollsToTop"];
instance.isPagingEnabled = map["isPagingEnabled"];
instance.maximumZoomScale = map["maximumZoomScale"];
instance.minimumZoomScale = map["minimumZoomScale"];
instance.contentInsetAdjustmentBehavior =
IOSUIScrollViewContentInsetAdjustmentBehavior.fromNativeValue(
map["contentInsetAdjustmentBehavior"])!;
instance.isDirectionalLockEnabled = map["isDirectionalLockEnabled"];
instance.mediaType = map["mediaType"];
instance.pageZoom = map["pageZoom"];
instance.limitsNavigationsToAppBoundDomains =
map["limitsNavigationsToAppBoundDomains"];
instance.useOnNavigationResponse = map["useOnNavigationResponse"];
instance.applePayAPIEnabled = map["applePayAPIEnabled"];
instance.allowingReadAccessTo = map["allowingReadAccessTo"] != null
? Uri.tryParse(map["allowingReadAccessTo"])
: null;
instance.disableLongPressContextMenuOnLinks =
map["disableLongPressContextMenuOnLinks"];
instance.disableInputAccessoryView = map["disableInputAccessoryView"];
return instance;
}