createAnimationController static method

AnimationController createAnimationController({
  1. required TickerProvider vsync,
  2. Duration? duration,
  3. Duration? reverseDuration,
})

Creates an animation controller useful for driving a snack bar's entrance and exit animation.

Implementation

static AnimationController createAnimationController({
  required TickerProvider vsync,
  Duration? duration,
  Duration? reverseDuration,
}) {
  return AnimationController(
    duration: duration ?? _snackBarTransitionDuration,
    reverseDuration: reverseDuration,
    debugLabel: 'SnackBar',
    vsync: vsync,
  );
}