SliverConstraints constructor Null safety

const SliverConstraints(
  1. {required AxisDirection axisDirection,
  2. required GrowthDirection growthDirection,
  3. required ScrollDirection userScrollDirection,
  4. required double scrollOffset,
  5. required double precedingScrollExtent,
  6. required double overlap,
  7. required double remainingPaintExtent,
  8. required double crossAxisExtent,
  9. required AxisDirection crossAxisDirection,
  10. required double viewportMainAxisExtent,
  11. required double remainingCacheExtent,
  12. required double cacheOrigin}
)

Creates sliver constraints with the given information.

All of the argument must not be null.

Implementation

const SliverConstraints({
  required this.axisDirection,
  required this.growthDirection,
  required this.userScrollDirection,
  required this.scrollOffset,
  required this.precedingScrollExtent,
  required this.overlap,
  required this.remainingPaintExtent,
  required this.crossAxisExtent,
  required this.crossAxisDirection,
  required this.viewportMainAxisExtent,
  required this.remainingCacheExtent,
  required this.cacheOrigin,
}) : assert(axisDirection != null),
     assert(growthDirection != null),
     assert(userScrollDirection != null),
     assert(scrollOffset != null),
     assert(precedingScrollExtent != null),
     assert(overlap != null),
     assert(remainingPaintExtent != null),
     assert(crossAxisExtent != null),
     assert(crossAxisDirection != null),
     assert(viewportMainAxisExtent != null),
     assert(remainingCacheExtent != null),
     assert(cacheOrigin != null);