BasePreferenceContainer

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!

 

In combination with com.michaelflisar.composepreferences.core.PreferenceScreen it takes care of the inner hierarchical data and additionally it handles the enabled/visibiltiy state of the preference (depending on the dependencies as well as on the hierarchical position) as well as the click and long click

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

onClick

the optional click listener for this item

onLongClick

the optional long click listener for this item

type

an internal flag to decide if this item holds sub items (and what type of sub items) or not (needed for the hierarchical data management)

itemStyle

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

filterTags

the tags for filtering - those MUST contain title and subtitles as well here!

content

the content of this composable