ToggleOption

data class ToggleOption(@StringRes val text: Int, val icon: ImageVector)

A data class representing a toggle option.

Usage example:

val themeOptions = listOf(
ToggleOption(text = R.string.light_theme, icon = Icons.Default.LightMode),
ToggleOption(text = R.string.dark_theme, icon = Icons.Default.DarkMode),
ToggleOption(text = R.string.system_theme, icon = Icons.Default.Settings),
)

Parameters

text

The string resource ID for the text to display for the option.

icon

The icon to display for the option.

Constructors

Link copied to clipboard
constructor(@StringRes text: Int, icon: ImageVector)

Properties

Link copied to clipboard
Link copied to clipboard
val text: Int