androidx.compose.ui
composed
Function · from org.jetbrains.compose.ui:ui:1.12.2
No hand-written docs yet.
Declare a just-in-time composition of a Modifier that will be composed for each element it modifies. composed may be used to implement stateful modifiers that have instance-specific state for each modified element, allowing the same Modifier instance to be safely reused for multiple elements while maintaining element-specific state.
Form 1
fun Modifier.composed(
inspectorInfo: InspectorInfo.() -> Unit = NoInspectorInfo,
factory: @Composable Modifier.() -> Modifier,
): Modifier
inspectorInfo: InspectorInfo.() -> UnitOptional
inspectorInfo: InspectorInfo.() -> UnitOptionalDefault: NoInspectorInfo
Not described.
Form 2
fun Modifier.composed(
fullyQualifiedName: String,
key1: Any?,
inspectorInfo: InspectorInfo.() -> Unit = NoInspectorInfo,
factory: @Composable Modifier.() -> Modifier,
): Modifier
fullyQualifiedName: StringRequired
fullyQualifiedName: StringRequiredNot described.
key1: Any?Required
key1: Any?RequiredNot described.
Same as above: inspectorInfo, factory.
Form 3
fun Modifier.composed(
fullyQualifiedName: String,
key1: Any?,
key2: Any?,
inspectorInfo: InspectorInfo.() -> Unit = NoInspectorInfo,
factory: @Composable Modifier.() -> Modifier,
): Modifier
key2: Any?Required
key2: Any?RequiredNot described.
Same as above: fullyQualifiedName, key1, inspectorInfo, factory.
With key3
fun Modifier.composed(
fullyQualifiedName: String,
key1: Any?,
key2: Any?,
key3: Any?,
inspectorInfo: InspectorInfo.() -> Unit = NoInspectorInfo,
factory: @Composable Modifier.() -> Modifier,
): Modifier
key3: Any?Required
key3: Any?RequiredNot described.
Same as above: fullyQualifiedName, key1, key2, inspectorInfo, factory.
With keys
fun Modifier.composed(
fullyQualifiedName: String,
vararg keys: Any?,
inspectorInfo: InspectorInfo.() -> Unit = NoInspectorInfo,
factory: @Composable Modifier.() -> Modifier,
): Modifier
keys: Any?Required
keys: Any?RequiredNot described.
Same as above: fullyQualifiedName, inspectorInfo, factory.
Library docs
Declare a just-in-time composition of a Modifier that will be composed for each element it
modifies. composed may be used to implement stateful modifiers that have instance-specific
state for each modified element, allowing the same Modifier instance to be safely reused for
multiple elements while maintaining element-specific state.
If inspectorInfo is specified this modifier will be visible to tools during development.
Specify the name and arguments of the original modifier.
Example usage: