PreferenceSectionScope
Functions
Link copied to clipboard
fun PreferenceScope.BasePreference(modifier: Modifier = Modifier, enabled: Dependency = Dependency.Enabled, visible: Dependency = Dependency.Enabled, title: String, subtitle: String? = null, icon: @Composable () -> Unit? = null, onClick: () -> Unit? = null, onLongClick: () -> Unit? = null, itemStyle: PreferenceItemStyle = LocalPreferenceSettings.current.style.defaultItemStyle, itemSetup: PreferenceItemSetup = PreferenceItemSetup(), titleRenderer: @Composable (text: AnnotatedString) -> Unit = { Text(it) }, subtitleRenderer: @Composable (text: AnnotatedString) -> Unit = { Text(it) }, filterTags: List<String> = emptyList(), content: @Composable ColumnScope.() -> Unit? = null)
this is the default root composable that uses a BasePreferenceContainer and provides you with a common default layout that consists of an area for an icon, a title, a sub title and some content
Link copied to clipboard
fun PreferenceScope.BasePreferenceContainer(modifier: Modifier = Modifier, enabled: Dependency = Dependency.Enabled, visible: Dependency = Dependency.Enabled, onClick: () -> Unit? = null, onLongClick: () -> Unit? = null, itemStyle: PreferenceItemStyle = LocalPreferenceSettings.current.style.defaultItemStyle, filterTags: List<String> = emptyList(), content: @Composable (modifier: Modifier) -> Unit)
this is the root composable that MUST be used by all preferences!
Link copied to clipboard
fun PreferenceScope.BasePreferenceCustom(modifier: Modifier = Modifier, enabled: Dependency = Dependency.Enabled, visible: Dependency = Dependency.Enabled, onClick: () -> Unit? = null, onLongClick: () -> Unit? = null, itemStyle: PreferenceItemStyle = LocalPreferenceSettings.current.style.defaultItemStyle, itemSetup: PreferenceItemSetup = PreferenceItemSetup(), filterTags: List<String> = emptyList(), content: @Composable ColumnScope.() -> Unit)
this is the default root composable that uses a BasePreferenceContainer and provides you with a common default layout that consists of an area for an icon, a title, a sub title and some content
Link copied to clipboard
fun PreferenceScope.BasePreferenceDialog(dialogState: DialogStateNoData, dialog: @Composable (state: DialogStateNoData) -> Unit, title: String, enabled: Dependency = Dependency.Enabled, visible: Dependency = Dependency.Enabled, subtitle: String? = null, icon: @Composable () -> Unit? = null, itemStyle: PreferenceItemStyle = LocalPreferenceSettings.current.style.defaultItemStyle, itemSetup: PreferenceItemSetup = PreferenceInfoDefaults.itemSetup(), titleRenderer: @Composable (text: AnnotatedString) -> Unit = { Text(it) }, subtitleRenderer: @Composable (text: AnnotatedString) -> Unit = { Text(it) }, filterTags: List<String> = emptyList(), content: @Composable ColumnScope.() -> Unit? = null)
A dialog preference item
Link copied to clipboard
fun PreferenceScope.PreferenceCustom(onClick: () -> Unit? = null, onLongClick: () -> Unit? = null, enabled: Dependency = Dependency.Enabled, visible: Dependency = Dependency.Enabled, itemStyle: PreferenceItemStyle = LocalPreferenceSettings.current.style.defaultItemStyle, itemSetup: PreferenceItemSetup = PreferenceCustomDefaults.itemSetup(), filterTags: List<String> = emptyList(), content: @Composable ColumnScope.() -> Unit)
A info preference item
Link copied to clipboard
fun PreferenceScope.PreferenceDivider(enabled: Dependency = Dependency.Enabled, visible: Dependency = Dependency.Enabled, itemStyle: PreferenceItemStyle = LocalPreferenceSettings.current.style.defaultItemStyle, filterTags: List<String> = emptyList())
A divider preference item
Link copied to clipboard
fun PreferenceScope.PreferenceInfo(onLongClick: () -> Unit? = null, title: String, enabled: Dependency = Dependency.Enabled, visible: Dependency = Dependency.Enabled, subtitle: String? = null, icon: @Composable () -> Unit? = null, itemStyle: PreferenceItemStyle = LocalPreferenceSettings.current.style.defaultItemStyle, itemSetup: PreferenceItemSetup = PreferenceInfoDefaults.itemSetup(), titleRenderer: @Composable (text: AnnotatedString) -> Unit = { Text(it) }, subtitleRenderer: @Composable (text: AnnotatedString) -> Unit = { Text(it) }, filterTags: List<String> = emptyList())
A info preference item
Link copied to clipboard
fun PreferenceScope.PreferenceSubScreen(enabled: Dependency = Dependency.Enabled, visible: Dependency = Dependency.Enabled, title: String, subtitle: String? = null, icon: @Composable () -> Unit? = null, itemStyle: PreferenceItemStyle = LocalPreferenceSettings.current.style.defaultGroupItemStyle, titleRenderer: @Composable (text: AnnotatedString) -> Unit = { Text(it) }, subtitleRenderer: @Composable (text: AnnotatedString) -> Unit = { Text(it) }, filterTags: List<String> = emptyList(), content: @Composable PreferenceGroupScope.() -> Unit)
A group preference item