I am currently trying to learn flutter and trying to make a tic tac toe game in flutter. I want my game such that when I tap on a tile, the circles and crosses fall from above. I am trying to implement this using Transform.Translate()
twice. Like this
GridTile(
child: Transform.translate(
child: Transform.translate(
child: Image.asset(
MultiPlayerGameLogic().imageProvider(i),
fit: BoxFit.scaleDown,
),
offset: Offset(0, -1000),
),
offset: Offset(0, 1000),
),
)
But this happens instantly and no animation can be seen. I want to set the duration of outer Transform.translate()
. But cannot find any way to do so.
Transform.translate
does not provide any animation - you would needAnimatedAlign
/AlignTransition
/SlideTransition
or similar widgets – Leora