fromAnimationAndTriggeredMove static method

AnimatedMoveId fromAnimationAndTriggeredMove({
  1. required bool animationIsCompleted,
  2. required bool hasTriggeredMove,
})

Implementation

static AnimatedMoveId fromAnimationAndTriggeredMove({
  required bool animationIsCompleted,
  required bool hasTriggeredMove,
}) {
  final AnimatedMoveId moveId;
  if (animationIsCompleted) {
    moveId = AnimatedMoveId.finished;
  } else if (!hasTriggeredMove) {
    moveId = AnimatedMoveId.started;
  } else {
    moveId = AnimatedMoveId.inProgress;
  }
  return moveId;
}