RouteRotateZoom constructor

RouteRotateZoom(
  1. Widget widget, {
  2. Duration duration = const Duration(seconds: 1),
})

Implementation

RouteRotateZoom(
  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 RotationTransition(
                turns: Tween(begin: 0.0, end: 1.0).animate(CurvedAnimation(
                    parent: animation1, curve: Curves.fastOutSlowIn)),
                child: ScaleTransition(
                  scale: Tween(begin: 0.0, end: 1.0).animate(CurvedAnimation(
                      parent: animation1, curve: Curves.fastOutSlowIn)),
                  child: child,
                ));
          });