Reputation: 550
I'm trying to create a animation for widgets which would make them flip. I've found snippets online but they all flip the middle, I want to flip from the extreme left or right
Upvotes: 0
Views: 435
Reputation: 550
It's a simple fix. If you already have a Transform widget that can do the image above, the alignment property of the widget is probably set to Alignment.center
, change this to Alignment.centerLeft
or Alignment.centerRight
to flip from right to left or left to right respectively
...
child: Transform(
transform: Matrix4.identity()...,
alignment: Alignment.centerLeft,
child: ...,
),
);
Upvotes: 1