Function

DarkMode

A DeviceConfigurationOverride that overrides the dark mode or light mode theme for the contained content.

RevenueCat

RevenueCat

Add subscriptions to your apps in minutes

Ad Get started for free

DarkMode

Android
fun DeviceConfigurationOverride.Companion.DarkMode(
    isDarkMode: Boolean
): DeviceConfigurationOverride

A DeviceConfigurationOverride that overrides the dark mode or light mode theme for the contained content. Inside the content under test, isSystemInDarkTheme() will return isDarkMode.

Parameters

isDarkMode if true, render content under test in dark mode.

Returns

a DeviceConfigurationOverride that specifies the dark mode for the content under test.