Ran into this issue for the first time ```Row { ...
# compose
x
Ran into this issue for the first time
Copy code
Row {
  Box {
    AnimatedVisibility()
  }
}
this gives you an error
Copy code
'fun RowScope.AnimatedVisibility(visible: Boolean, modifier: Modifier = ..., enter: EnterTransition = ..., exit: ExitTransition = ..., label: String = ..., content: AnimatedVisibilityScope.() -> Unit): Unit' can't be called in this context by implicit receiver. Use the explicit one if necessary
I understand that there are three
AnimatedVisibility
functions
Copy code
@Composable fun AnimatedVisibility
@Composable fun RowScope.AnimatedVisibility
@Composable fun ColumnScope.AnimatedVisibility
But how do I invoke the first one without any scope?
a
Wrap your component. In it? I’m guessing you need a child
a
As per https://kotlinlang.slack.com/archives/CJLTWPH7S/p1645429558329399?thread_ts=1645428026.387679&cid=CJLTWPH7S you can use the fully qualified name to workaround that:
Copy code
Row {
    Box {
        androidx.compose.animation.AnimatedVisibility()
    }
}
x
yeah - or
Copy code
Row {
  Box {
    this@Row.AnimatedVisibility()
  }
}
but here im using the second one