toggled

fun ThemeMode.toggled(systemInDarkTheme: Boolean): ThemeMode

The explicit mode that flips what is currently shown, for a single light/dark toggle button.

The result is always ThemeMode.LIGHT or ThemeMode.DARK, never ThemeMode.SYSTEM, so toggling while following the system pins the opposite of the current system appearance.