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
Jordi Saumell
07/08/2025, 8:09 AM
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
e
efemoney
07/14/2025, 4:51 PM
Context parameters are the way and you should be able to use them form 2.2.