slideInRight static method

Transform slideInRight({
  1. required Widget child,
  2. required Animation animation,
})

slideInRight Animation

Implementation

static Transform slideInRight({
  /// child
  required Widget child,

  /// animation
  required Animation animation,
}) {
  final curvedValue = Curves.easeInOutBack.transform(animation.value) - 1.0;
  return Transform(
    transform: Matrix4.translationValues(curvedValue * -200, 0, 0),
    child: Opacity(
      opacity: animation.value,
      child: child,
    ),
  );
}