setTheme

external fun setTheme(theme: Theme? = definedExternally): Promise<Void>(source)

Set window theme, pass in null or undefined to follow system theme

Platform-specific

  • Linux / macOS: Theme is app-wide and not specific to this window.

  • iOS / Android: Unsupported.

Use {@link Window.theme} to read the effective theme and {@link Window.onThemeChanged} to react to changes.

Since

2.0.0

Parameters

theme

The theme to apply, or null/undefined to follow the system theme.