ChromeSafariBrowserSettings class
Class that represents the settings that can be used for an ChromeSafariBrowser window.
- Implemented types
Constructors
-
ChromeSafariBrowserSettings({bool? showTitle = true, Color? toolbarBackgroundColor, Color? secondaryToolbarColor, bool? enableUrlBarHiding = false, bool? instantAppsEnabled = false, String? packageName, bool? keepAliveEnabled = false, bool? isSingleInstance = false, bool? noHistory = false, bool? isTrustedWebActivity = false, List<
String> ? additionalTrustedOrigins = const [], TrustedWebActivityDisplayMode? displayMode, TrustedWebActivityScreenOrientation? screenOrientation = TrustedWebActivityScreenOrientation.DEFAULT, List<AndroidResource> ? startAnimations, List<AndroidResource> ? exitAnimations, bool? alwaysUseBrowserUI = false, bool? entersReaderIfAvailable = false, bool? barCollapsingEnabled = false, DismissButtonStyle? dismissButtonStyle = DismissButtonStyle.DONE, Color? preferredBarTintColor, Color? preferredControlTintColor, ModalPresentationStyle? presentationStyle = ModalPresentationStyle.FULL_SCREEN, ModalTransitionStyle? transitionStyle = ModalTransitionStyle.COVER_VERTICAL, ActivityButton? activityButton, UIEventAttribution? eventAttribution})
Properties
- activityButton ↔ ActivityButton?
-
An additional button to be shown in
SFSafariViewController
's toolbar. This allows the user to access powerful functionality from your extension without needing to first show theUIActivityViewController
.getter/setter pair -
additionalTrustedOrigins
↔ List<
String> ? -
Sets a list of additional trusted origins that the user may navigate or be redirected to from the starting uri.
getter/setter pair
- alwaysUseBrowserUI ↔ bool?
-
Adds the necessary flags and extras to signal any browser supporting custom tabs to use the browser UI
at all times and avoid showing custom tab like UI.
Calling this with an intent will override any custom tabs related customizations.
The default value is
false
.getter/setter pair - barCollapsingEnabled ↔ bool?
-
Set to
true
to enable bar collapsing. The default value isfalse
.getter/setter pair - dismissButtonStyle ↔ DismissButtonStyle?
-
Set the custom style for the dismiss button. The default value is DismissButtonStyle.DONE.
getter/setter pair
- displayMode ↔ TrustedWebActivityDisplayMode?
-
Sets a display mode of a Trusted Web Activity.
getter/setter pair
- enableUrlBarHiding ↔ bool?
-
Set to
true
to enable the url bar to hide as the user scrolls down on the page. The default value isfalse
.getter/setter pair - entersReaderIfAvailable ↔ bool?
-
Set to
true
if Reader mode should be entered automatically when it is available for the webpage. The default value isfalse
.getter/setter pair - eventAttribution ↔ UIEventAttribution?
-
An event attribution associated with a click that caused this
SFSafariViewController
to be opened. This attribute is ignored if theSFSafariViewController
url has a scheme of 'http'.getter/setter pair -
exitAnimations
↔ List<
AndroidResource> ? -
Sets the exit animations.
It must contain 2 AndroidResource, where the first one represents the "enter" animation for the application
and the second one represents the "exit" animation for the browser.
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setterinherited
- instantAppsEnabled ↔ bool?
-
Set to
true
to enable Instant Apps. The default value isfalse
.getter/setter pair - isSingleInstance ↔ bool?
-
Set to
true
to launch the Android activity insingleInstance
mode. The default value isfalse
.getter/setter pair - isTrustedWebActivity ↔ bool?
-
Set to
true
to launch the Custom Tab as a Trusted Web Activity. The default value isfalse
.getter/setter pair - keepAliveEnabled ↔ bool?
-
Set to
true
to enable Keep Alive. The default value isfalse
.getter/setter pair -
Sets the navigation bar color. Has no effect on Android API versions below L.
getter/setter pair
-
Sets the navigation bar divider color. Has no effect on Android API versions below P.
getter/setter pair
- noHistory ↔ bool?
-
Set to
true
to launch the Android intent with the flagFLAG_ACTIVITY_NO_HISTORY
. The default value isfalse
.getter/setter pair - packageName ↔ String?
-
Set an explicit application package name that limits
the components this Intent will resolve to. If left to the default
value of null, all components in all applications will considered.
If non-null, the Intent can only match the components in the given
application package.
getter/setter pair
- preferredBarTintColor ↔ Color?
-
Set the custom background color of the navigation bar and the toolbar.
getter/setter pair
- preferredControlTintColor ↔ Color?
-
Set the custom color of the control buttons on the navigation bar and the toolbar.
getter/setter pair
- presentationStyle ↔ ModalPresentationStyle?
-
Set the custom modal presentation style when presenting the WebView. The default value is ModalPresentationStyle.FULL_SCREEN.
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- screenOrientation ↔ TrustedWebActivityScreenOrientation?
-
Sets a screen orientation. This can be used e.g. to enable the locking of an orientation lock type.
getter/setter pair
- secondaryToolbarColor ↔ Color?
-
Sets the color of the secondary toolbar.
getter/setter pair
-
The share state that should be applied to the custom tab. The default value is CustomTabsShareState.SHARE_STATE_DEFAULT.
getter/setter pair
- showTitle ↔ bool?
-
Set to
false
if the title shouldn't be shown in the custom tab. The default value istrue
.getter/setter pair -
startAnimations
↔ List<
AndroidResource> ? -
Sets the start animations.
It must contain 2 AndroidResource, where the first one represents the "enter" animation for the browser
and the second one represents the "exit" animation for the application.
getter/setter pair
- toolbarBackgroundColor ↔ Color?
-
Set the custom background color of the toolbar.
getter/setter pair
- transitionStyle ↔ ModalTransitionStyle?
-
Set to the custom transition style when presenting the WebView. The default value is ModalTransitionStyle.COVER_VERTICAL.
getter/setter pair
Methods
-
copy(
) → ChromeSafariBrowserSettings -
Returns a copy of ChromeSafariBrowserSettings.
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> -
Converts instance to a map.
override
-
toMap(
) → Map< String, dynamic> -
Converts instance to a map.
override
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
fromMap(
Map< String, dynamic> ? map) → ChromeSafariBrowserSettings? -
Gets a possible ChromeSafariBrowserSettings instance from a Map value.
override