scaleDialog static method

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

scale the dialog from zero size to the max height and width

Implementation

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

  /// the animation as double
  required Animation<double> animation,
}) {
  // scale the animation as the value from 0 to 1
  return Transform.scale(
    scale: animation.value,
    child: Opacity(
      opacity: animation.value,
      child: child,
    ),
  );
}