RouteZoom constructor
RouteZoom(
- Widget widget, {
- Duration duration = const Duration(seconds: 1),
})
Implementation
RouteZoom(
this.widget, {
Duration duration = const Duration(seconds: 1),
}) : super(
transitionDuration: duration,
pageBuilder: (BuildContext context, Animation<double> animation1,
Animation<double> animation2) {
return widget;
},
transitionsBuilder: (BuildContext context,
Animation<double> animation1,
Animation<double> animation2,
Widget child) {
return ScaleTransition(
scale: Tween(begin: 0.0, end: 1.0).animate(CurvedAnimation(
parent: animation1, curve: Curves.fastOutSlowIn)),
child: child);
});