horizontalTransition function

AnimatedWidget horizontalTransition(
  1. BuildContext context,
  2. Animation<double> animation,
  3. Animation<double> secondaryAnimation,
  4. Widget child,
)

Implementation

AnimatedWidget horizontalTransition(
    BuildContext context,
    Animation<double> animation,
    Animation<double> secondaryAnimation,
    Widget child) {
  var begin = Offset(1.0, 0.0);
  var end = Offset.zero;
  var curve = Curves.ease;
  var tween = Tween(begin: begin, end: end).chain(CurveTween(curve: curve));
  return SlideTransition(
    position: animation.drive(tween),
    child: child,
  );
}