moveX method

T moveX({
  1. Duration? delay,
  2. Duration? duration,
  3. Curve? curve,
  4. double? begin,
  5. double? end,
  6. bool? transformHitTests,
})

Adds a moveX extension to AnimateManager (Animate and AnimateList). This moves only on the x-axis according to the double begin/end values.

Implementation

T moveX({
  Duration? delay,
  Duration? duration,
  Curve? curve,
  double? begin,
  double? end,
  bool? transformHitTests,
}) {
  begin ??= end == null ? MoveEffect.defaultMove : MoveEffect.neutralMove;
  end ??= MoveEffect.neutralMove;
  return addEffect(MoveEffect(
    delay: delay,
    duration: duration,
    curve: curve,
    begin: MoveEffect.neutralValue.copyWith(dx: begin),
    end: MoveEffect.neutralValue.copyWith(dx: end),
    transformHitTests: transformHitTests,
  ));
}