forceDarkStrategy property

  1. @Deprecated('Use algorithmicDarkeningAllowed instead')
ForceDarkStrategy? forceDarkStrategy
getter/setter pair

Use algorithmicDarkeningAllowed instead.

Set how WebView content should be darkened. The default value is ForceDarkStrategy.PREFER_WEB_THEME_OVER_USER_AGENT_DARKENING.

Deprecated - The "force dark" model previously implemented by WebView was complex and didn't interoperate well with current Web standards for prefers-color-scheme and color-scheme. In apps with targetSdkVersionandroid.os.Build.VERSION_CODES.TIRAMISU this API is a no-op and WebView will always use the dark style defined by web content authors if the app's theme is dark. To customize the behavior, refer to algorithmicDarkeningAllowed.

Officially Supported Platforms/Implementations:

Implementation

@Deprecated('Use algorithmicDarkeningAllowed instead')
ForceDarkStrategy? forceDarkStrategy;