forceDark property

  1. @Deprecated('Use algorithmicDarkeningAllowed instead')
ForceDark? forceDark
getter/setter pair

Use algorithmicDarkeningAllowed instead.

Set the force dark mode for this WebView. The default value is ForceDark.OFF.

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')
ForceDark? forceDark;