ForceDarkStrategy enum
Class used to indicate how WebView content should be darkened.
Values
- USER_AGENT_DARKENING_ONLY → const ForceDarkStrategy
-
In this mode
WebViewcontent will be darkened by a user agent and it will ignore the web page's dark theme if it exists. To avoid mixing two different darkening strategies, theprefers-color-schememedia query will evaluate to light.See specification for more information.
- WEB_THEME_DARKENING_ONLY → const ForceDarkStrategy
-
In this mode
WebViewcontent will always be darkened using dark theme provided by web page. If web page does not provide dark theme supportWebViewcontent will be rendered with a default theme.See specification for more information.
- PREFER_WEB_THEME_OVER_USER_AGENT_DARKENING → const ForceDarkStrategy
-
In this mode
WebViewcontent will be darkened by a user agent unless web page supports dark theme.WebViewdetermines whether web pages supports dark theme by the presence ofcolor-schememetadata containing"dark"value. For example,<meta name="color-scheme" content="dark light">. If the metadata is not presentedWebViewcontent will be darkened by a user agent andprefers-color-schememedia query will evaluate to light.See specification for more information.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- index → int
-
A numeric identifier for the enumerated value.
no setterinherited
- name → String
-
Available on Enum, provided by the EnumName extension
The name of the enum value.no setter - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Constants
-
values
→ const List<
ForceDarkStrategy> - A constant List of the values in this enum, in order of their declaration.