slideInDown static method

Transform slideInDown({
  1. required Widget child,
  2. required Animation<double> animation,
})

slideInDown Animation

Implementation

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

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