DraggableScrollableSheet constructor

const DraggableScrollableSheet(
  1. {Key? key,
  2. double initialChildSize = 0.5,
  3. double minChildSize = 0.25,
  4. double maxChildSize = 1.0,
  5. bool expand = true,
  6. bool snap = false,
  7. List<double>? snapSizes,
  8. Duration? snapAnimationDuration,
  9. DraggableScrollableController? controller,
  10. bool shouldCloseOnMinExtent = true,
  11. required ScrollableWidgetBuilder builder}
)

Creates a widget that can be dragged and scrolled in a single gesture.

Implementation

const DraggableScrollableSheet({
  super.key,
  this.initialChildSize = 0.5,
  this.minChildSize = 0.25,
  this.maxChildSize = 1.0,
  this.expand = true,
  this.snap = false,
  this.snapSizes,
  this.snapAnimationDuration,
  this.controller,
  this.shouldCloseOnMinExtent = true,
  required this.builder,
})  : assert(minChildSize >= 0.0),
      assert(maxChildSize <= 1.0),
      assert(minChildSize <= initialChildSize),
      assert(initialChildSize <= maxChildSize),
      assert(snapAnimationDuration == null || snapAnimationDuration > Duration.zero);