NestedScrollView constructor Null safety

const NestedScrollView(
  1. {Key? key,
  2. ScrollController? controller,
  3. Axis scrollDirection,
  4. bool reverse,
  5. ScrollPhysics? physics,
  6. required NestedScrollViewHeaderSliversBuilder headerSliverBuilder,
  7. required Widget body,
  8. DragStartBehavior dragStartBehavior,
  9. bool floatHeaderSlivers,
  10. Clip clipBehavior,
  11. String? restorationId,
  12. ScrollBehavior? scrollBehavior}
)

Creates a nested scroll view.

The reverse, headerSliverBuilder, and body arguments must not be null.

Implementation

const NestedScrollView({
  Key? key,
  this.controller,
  this.scrollDirection = Axis.vertical,
  this.reverse = false,
  this.physics,
  required this.headerSliverBuilder,
  required this.body,
  this.dragStartBehavior = DragStartBehavior.start,
  this.floatHeaderSlivers = false,
  this.clipBehavior = Clip.hardEdge,
  this.restorationId,
  this.scrollBehavior,
}) : assert(scrollDirection != null),
     assert(reverse != null),
     assert(headerSliverBuilder != null),
     assert(body != null),
     assert(floatHeaderSlivers != null),
     assert(clipBehavior != null),
     super(key: key);