ShrinkSheetController.simple constructor

ShrinkSheetController.simple({
  1. required TickerProvider vsync,
  2. bool initialShrink = true,
  3. required Duration shrinkDuration,
  4. bool initialShow = true,
  5. required Duration fadeInDuration,
})

Implementation

factory ShrinkSheetController.simple(
    {required TickerProvider vsync,
    bool initialShrink = true,
    required Duration shrinkDuration,
    bool initialShow = true,
    required Duration fadeInDuration}) {
  return ShrinkSheetController(
    shrinkController: AnimationController(
      vsync: vsync,
      duration: shrinkDuration,
      value: initialShrink ? 0 : 1,
    ),
    hideController: AnimationController(
      vsync: vsync,
      duration: fadeInDuration,
      value: initialShow ? 1 : 0,
    ),
  );
}