SlideAnimation constructor

const SlideAnimation({
  1. Key? key,
  2. Duration? duration,
  3. Duration? delay,
  4. Curve curve = Curves.ease,
  5. double? verticalOffset,
  6. double? horizontalOffset,
  7. required Widget child,
})

Creates a slide animation that slides its child from the given verticalOffset and horizontalOffset to its final position.

A default value of 50.0 is applied to verticalOffset if verticalOffset and horizontalOffset are both undefined or null.

The child argument must not be null.

Implementation

const SlideAnimation({
  Key? key,
  this.duration,
  this.delay,
  this.curve = Curves.ease,
  double? verticalOffset,
  double? horizontalOffset,
  required this.child,
})   : verticalOffset = (verticalOffset == null && horizontalOffset == null) ? 50.0 : (verticalOffset ?? 0.0),
      horizontalOffset = horizontalOffset ?? 0.0,
      super(key: key);