scoped-composable-shadows-the-top-level-one
Installation
SKILL.md
The scoped overload shadows the top-level one
Several toolkit composables ship as a top-level function and as extensions on the layout scopes. The extensions differ in their default transitions and in how the element participates in the parent layout. Kotlin prefers an extension on an implicit receiver over a plain top-level function, so inside a column or a row the scoped one wins by default — with no warning, because the call compiles.
// adapted — forcing the top-level overload; the visibility condition is shortened
androidx.compose.animation.AnimatedVisibility(
visible = isVideo && watchVideo,
modifier = Modifier.align(Alignment.Center),
) { … }