Skip to content

Instantly share code, notes, and snippets.

@crazy-diya
Created November 6, 2021 05:52
Show Gist options
  • Save crazy-diya/30247ad487da113cbc1008a87e857f04 to your computer and use it in GitHub Desktop.
Save crazy-diya/30247ad487da113cbc1008a87e857f04 to your computer and use it in GitHub Desktop.
Animate Transaction Page to Page flutter Navigator
Navigator.of(context).push(
PageRouteBuilder(
transitionDuration: Duration(milliseconds: 1000),
pageBuilder: (BuildContext context,
Animation<double> animation,
Animation<double> secondaryAnimation) {
return HomePage();
},
transitionsBuilder: (BuildContext context,
Animation<double> animation,
Animation<double> secondaryAnimation,
Widget child) {
return Align(
child: FadeTransition(
opacity: animation,
child: child,
),
);
},
),
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment