DraggableScrollableSheet constructor
- Key? key,
- double initialChildSize = 0.5,
- double minChildSize = 0.25,
- double maxChildSize = 1.0,
- bool expand = true,
- bool snap = false,
- List<
double> ? snapSizes, - Duration? snapAnimationDuration,
- DraggableScrollableController? controller,
- bool shouldCloseOnMinExtent = true,
- 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);