If I want to ensure the following code is applied ...
# compose
u
If I want to ensure the following code is applied within BoxScope:
@Composable fun Modifier.floatAction(): Modifier = this.align(Alignment.BottomEnd)
Does it need to be changed to:
@Composable fun BoxScope.floatAction(): Modifier = Modifier.align(Alignment.BottomEnd) // this is wrong
Or use Kotlin's context parameters feature.
j
For now it stick with the extension. I am not sure if at some point context parameters will be de recommended approach for this case, but right now you'd have to create your own logic to provide the context, as the apis are designed to work with normal extensions
1