rightToLeft static method

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

animate the dialog from right to left

Implementation

static Transform rightToLeft({
  /// the child
  required Widget child,

  /// the animation as double
  required Animation<double> animation,
}) {
  return Transform(
    // define the matrix 4 translation from our curve
    transform:
        Matrix4.translationValues(getCurvedValue(animation) * -200, 0, 0),
    child: Opacity(
      opacity: animation.value,
      child: child,
    ),
  );
}