DraggableScrollableSheet constructor Null safety

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. DraggableScrollableController? controller,
  9. required ScrollableWidgetBuilder builder}
)

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

The builder, initialChildSize, minChildSize, maxChildSize and expand parameters must not be null.

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.controller,
  required this.builder,
})  : assert(initialChildSize != null),
      assert(minChildSize != null),
      assert(maxChildSize != null),
      assert(minChildSize >= 0.0),
      assert(maxChildSize <= 1.0),
      assert(minChildSize <= initialChildSize),
      assert(initialChildSize <= maxChildSize),
      assert(expand != null),
      assert(builder != null);