Package-level declarations

Types

Link copied to clipboard
class Material3ThemePrefs(preferenceHelper: PreferenceHelper, darkColorScheme: ColorScheme = darkColorScheme(), lightColorScheme: ColorScheme = lightColorScheme()) : ThemePrefs

ThemePrefs implementation for Material 3 theming. Provides colorScheme that switches based on ThemeEnum (light/dark/system).

Properties

Link copied to clipboard

Returns ColorScheme when this ThemePrefs is a Material3ThemePrefs; use inside Material 3 theme scope.

Functions

Link copied to clipboard
fun Material3AlertDialogContent(modifier: Modifier = Modifier, title: @Composable BoxScope.() -> Unit? = null, text: @Composable BoxScope.() -> Unit? = null, confirmButton: @Composable () -> Unit, dismissButton: @Composable () -> Unit? = null, shape: Shape = AlertDialogDefaults.shape, containerColor: Color = AlertDialogDefaults.containerColor, titleContentColor: Color = AlertDialogDefaults.titleContentColor, textContentColor: Color = AlertDialogDefaults.textContentColor, tonalElevation: Dp = AlertDialogDefaults.TonalElevation)
Link copied to clipboard
fun PreferableMaterialTheme(preferHelper: PreferenceHelper = rememberPreferenceHelper(), darkColorScheme: ColorScheme = darkColorScheme(), lightColorScheme: ColorScheme = lightColorScheme(), content: @Composable PreferableMaterialTheme.() -> Unit)

Material 3 theme that respects stored light/dark preference and provides ThemePrefs via LocalThemePrefs.

Link copied to clipboard

Non-clickable list item used as a section header (leading icon + headline in tertiary style).

Link copied to clipboard
fun PreferenceItem(title: String, vector: ImageVector, onClick: () -> Unit = {}, secondaryText: @Composable () -> Unit? = null, trailing: @Composable () -> Unit? = null)

Clickable list row for a preference: leading icon, headline, optional supporting/trailing content.

Link copied to clipboard

Radio group for selecting a ThemeEnum (Light, Dark, System default). Use inside theme dialogs.

Link copied to clipboard

Returns a Material3ThemePrefs remembered across recompositions using default rememberPreferenceHelper.

fun rememberThemePrefs(preferHelper: PreferenceHelper = rememberPreferenceHelper(), darkColorScheme: ColorScheme = darkColorScheme(), lightColorScheme: ColorScheme = lightColorScheme()): Material3ThemePrefs

Returns a Material3ThemePrefs with the given PreferenceHelper and color schemes.

Link copied to clipboard
fun SettingsScaffold(onBackClick: () -> Unit = {}, actions: @Composable RowScope.() -> Unit = {}, content: @Composable (PaddingValues) -> Unit)

Scaffold with a top app bar suitable for settings screens (back navigation + optional actions).

Link copied to clipboard
fun SettingsTopAppBar(onBackClick: () -> Unit = {}, actions: @Composable RowScope.() -> Unit = {}, localizedText: String = stringResource(Res.string.settings), backVector: ImageVector = Icons.AutoMirrored.Filled.ArrowBack)

Top app bar with back button and title for settings screens.

Link copied to clipboard
fun ThemeAlertDialog(themeState: MutableState<ThemeEnum> = themePrefs.themeState, writePref: (ThemeEnum) -> Unit = themePrefs.preferenceHelper.let { it::themeEnum::set }, dismissDialog: () -> Unit = {})

AlertDialog for selecting a theme. Should use directly in the composable destination that wants to show that dialog.

Link copied to clipboard
fun ThemeDialogContent(themeState: MutableState<ThemeEnum> = themePrefs.themeState, writePref: (ThemeEnum) -> Unit = themePrefs.preferenceHelper.let { it::themeEnum::set }, dismissDialog: () -> Unit = {})

Dialog layout for selecting a theme. Represents a separate screen. Should use in the dialog destination that will be hosted within a androidx.compose.ui.window.Dialog.

Link copied to clipboard
Link copied to clipboard
fun ThemePreferenceItem(themePrefs: ThemePrefs = LocalThemePrefs.current, onClick: () -> Unit = {})

List item that opens the theme picker when clicked. Shows current theme in secondary text.

Link copied to clipboard

List item used as a category header for the "Theme" section in preference screens.