ForceDarkStrategy enum

Class used to indicate how WebView content should be darkened.

Inheritance
Available extensions

Values

USER_AGENT_DARKENING_ONLY → const ForceDarkStrategy

In this mode WebView content 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, the prefers-color-scheme media query will evaluate to light.

See specification for more information.

WEB_THEME_DARKENING_ONLY → const ForceDarkStrategy

In this mode WebView content will always be darkened using dark theme provided by web page. If web page does not provide dark theme support WebView content will be rendered with a default theme.

See specification for more information.

PREFER_WEB_THEME_OVER_USER_AGENT_DARKENING → const ForceDarkStrategy

In this mode WebView content will be darkened by a user agent unless web page supports dark theme. WebView determines whether web pages supports dark theme by the presence of color-scheme metadata containing "dark" value. For example, <meta name="color-scheme" content="dark light">. If the metadata is not presented WebView content will be darkened by a user agent and prefers-color-scheme media 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.