Why do we have three different over load of `Anima...
# compose
z
Why do we have three different over load of
AnimatedVisibility
. More specifically why do we have
RowScope
and
ColumnScope
version of implementations? Isn’t without scope one is enough? I think I have seen this pattern for couple of other Composables. My curious minds wants to the reason behind it. 🧐
1
I realize this pattern because sometimes AS fails to import the right one. Also if I import the
ColumnScope
one then I can’t use any other version.
j
It's explained right in its javadoc:
When the [AnimatedVisibility] composable is put in a [Row] or a [Column], the default enter and exit transitions are tailored to that particular container.
z
@Jan Bína my qs is why three different version? why not single one without any scope.
z
Because without the separately scoped overloads “the default enter and exit transitions are tailored to that particular container” would not be possible
💯 3