Currently there is a Modifier.offset overload that consumes 2 lambdas to return an x and y offset parameter. To support a trailing lambda syntax, it might be possible to refactor the API signature to the following:
fun Modifier.offset(
offset: Density.() -> Offset = { Offset.Zero },
) = this.then(
OffsetPxModifier(
x = offset.x,
y = offset.y,
rtlAware = true,
inspectorInfo = debugInspectorInfo {
name = "offset"
properties["x"] = x
properties["y"] = y
}
)
)
This would support trailing lambda syntax and help assist with the mental model of leveraging lambdas for animated use cases to avoid unnecessary composition
Description
Currently there is a
Modifier.offset
overload that consumes 2 lambdas to return an x and y offset parameter. To support a trailing lambda syntax, it might be possible to refactor the API signature to the following:This would support trailing lambda syntax and help assist with the mental model of leveraging lambdas for animated use cases to avoid unnecessary composition