fromMap static method
Gets a possible InAppBrowserSettings instance from a Map value.
Implementation
static InAppBrowserSettings? fromMap(Map<String, dynamic>? map) {
if (map == null) {
return null;
}
final instance = InAppBrowserSettings(
closeButtonCaption: map['closeButtonCaption'],
closeButtonColor: map['closeButtonColor'] != null
? UtilColor.fromStringRepresentation(map['closeButtonColor'])
: null,
menuButtonColor: map['menuButtonColor'] != null
? UtilColor.fromStringRepresentation(map['menuButtonColor'])
: null,
toolbarBottomBackgroundColor: map['toolbarBottomBackgroundColor'] != null
? UtilColor.fromStringRepresentation(
map['toolbarBottomBackgroundColor'])
: null,
toolbarBottomTintColor: map['toolbarBottomTintColor'] != null
? UtilColor.fromStringRepresentation(map['toolbarBottomTintColor'])
: null,
toolbarTopBackgroundColor: map['toolbarTopBackgroundColor'] != null
? UtilColor.fromStringRepresentation(map['toolbarTopBackgroundColor'])
: null,
toolbarTopFixedTitle: map['toolbarTopFixedTitle'],
toolbarTopTintColor: map['toolbarTopTintColor'] != null
? UtilColor.fromStringRepresentation(map['toolbarTopTintColor'])
: null,
windowFrame:
InAppWebViewRect.fromMap(map['windowFrame']?.cast<String, dynamic>()),
windowStyleMask: WindowStyleMask.fromNativeValue(map['windowStyleMask']),
windowTitlebarSeparatorStyle:
WindowTitlebarSeparatorStyle.fromNativeValue(
map['windowTitlebarSeparatorStyle']),
windowType: WindowType.fromNativeValue(map['windowType']),
);
instance.allowGoBackWithBackButton = map['allowGoBackWithBackButton'];
instance.closeOnCannotGoBack = map['closeOnCannotGoBack'];
instance.hidden = map['hidden'];
instance.hideCloseButton = map['hideCloseButton'];
instance.hideDefaultMenuItems = map['hideDefaultMenuItems'];
instance.hideProgressBar = map['hideProgressBar'];
instance.hideTitleBar = map['hideTitleBar'];
instance.hideToolbarBottom = map['hideToolbarBottom'];
instance.hideToolbarTop = map['hideToolbarTop'];
instance.hideUrlBar = map['hideUrlBar'];
instance.presentationStyle =
ModalPresentationStyle.fromNativeValue(map['presentationStyle']);
instance.shouldCloseOnBackButtonPressed =
map['shouldCloseOnBackButtonPressed'];
instance.toolbarBottomTranslucent = map['toolbarBottomTranslucent'];
instance.toolbarTopBarTintColor = map['toolbarTopBarTintColor'] != null
? UtilColor.fromStringRepresentation(map['toolbarTopBarTintColor'])
: null;
instance.toolbarTopTranslucent = map['toolbarTopTranslucent'];
instance.transitionStyle =
ModalTransitionStyle.fromNativeValue(map['transitionStyle']);
instance.windowAlphaValue = map['windowAlphaValue'];
return instance;
}