createAnimationController static method

AnimationController createAnimationController(
  1. TickerProvider vsync,
  2. {AnimationStyle? sheetAnimationStyle}
)

Creates an AnimationController suitable for a BottomSheet.animationController.

This API available as a convenience for a Material compliant bottom sheet animation. If alternative animation durations are required, a different animation controller could be provided.

Implementation

static AnimationController createAnimationController(
  TickerProvider vsync,
  { AnimationStyle? sheetAnimationStyle }
) {
  return AnimationController(
    duration: sheetAnimationStyle?.duration ?? _bottomSheetEnterDuration,
    reverseDuration: sheetAnimationStyle?.reverseDuration ?? _bottomSheetExitDuration,
    debugLabel: 'BottomSheet',
    vsync: vsync,
  );
}