dimsuz
04/25/2022, 3:33 PMinternal fun Modifier.bottomOverlayPadding(): Modifier {
return Modifier
.align(Alignment.End) // can't use, need ColumnScope
}
Oleksandr Balan
04/25/2022, 4:01 PMscope
as first param to your custom modifier and then use with
in modifier body:
fun Modifier.bottomOverlayPadding(scope: ColumnScope) = with(scope) {
align(Alignment.End)
}
… or if you prefer some “hacky” way you may return a lambda with your needed scope
:
fun Modifier.bottomOverlayPadding(): ColumnScope.() -> Modifier = { align(Alignment.End) }
But usage will be a “little” strange with double parentheses 😅
.bottomOverlayPadding()()
dimsuz
04/25/2022, 4:20 PM