BasePreference

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

 

In most cases this should be the root container for any custom preference.

Parameters

modifier

the Modifier for this composable

enabled

the Dependency that from which the enabled state is derived from

visible

the Dependency that from which the visibility state is derived from

title

the content of the title area

subtitle

the content of the subtitle area

icon

the content of the icon area

onClick

the optional click listener for this item

onLongClick

the optional long click listener for this item

itemStyle

the PreferenceItemStyle of this this item - use PreferenceStyleDefaults.item and all the predefined styles in PreferenceStyleDefaults to provide your own style

itemSetup

the PreferenceItemSetup of this this item which allows you to influence some of the behaviour and style specifically for a special item type

filterTags

additional tags to title and sub title for the filter functionality

content

the content of this composable