I have a grid of cards that on onTap, I would like it to Expand to fill the screen. Just like on iOS when we click on a app launcher icon.
I manage to get it to expand, but it is always from the middle of the screen, with this:
onTap: () {
Navigator.of(context).push(new PageRouteBuilder(pageBuilder:
(BuildContext context, Animation animation,
Animation secondaryAnimation) {
return MyWidget();
}, transitionsBuilder: (BuildContext context,
Animation<double> animation,
Animation<double> secondaryAnimation,
Widget child) {
return Align(
child: ScaleTransition(
child: child,
scale: animation,
),
);
}));
}
I saw that ScaleTransition have a alignment, but I couldn't figure out how to use that to set it to the point in the middle of my Card.