BoxScrollView constructor Null safety

const BoxScrollView(
  1. {Key? key,
  2. Axis scrollDirection = Axis.vertical,
  3. bool reverse = false,
  4. ScrollController? controller,
  5. bool? primary,
  6. ScrollPhysics? physics,
  7. bool shrinkWrap = false,
  8. EdgeInsetsGeometry? padding,
  9. double? cacheExtent,
  10. int? semanticChildCount,
  11. DragStartBehavior dragStartBehavior = DragStartBehavior.start,
  12. ScrollViewKeyboardDismissBehavior keyboardDismissBehavior = ScrollViewKeyboardDismissBehavior.manual,
  13. String? restorationId,
  14. Clip clipBehavior = Clip.hardEdge}

Creates a ScrollView uses a single child layout model.

If the primary argument is true, the controller must be null.


const BoxScrollView({
  Key? key,
  Axis scrollDirection = Axis.vertical,
  bool reverse = false,
  ScrollController? controller,
  bool? primary,
  ScrollPhysics? physics,
  bool shrinkWrap = false,
  double? cacheExtent,
  int? semanticChildCount,
  DragStartBehavior dragStartBehavior = DragStartBehavior.start,
  ScrollViewKeyboardDismissBehavior keyboardDismissBehavior = ScrollViewKeyboardDismissBehavior.manual,
  String? restorationId,
  Clip clipBehavior = Clip.hardEdge,
}) : super(
  key: key,
  scrollDirection: scrollDirection,
  reverse: reverse,
  controller: controller,
  primary: primary,
  physics: physics,
  shrinkWrap: shrinkWrap,
  cacheExtent: cacheExtent,
  semanticChildCount: semanticChildCount,
  dragStartBehavior: dragStartBehavior,
  keyboardDismissBehavior: keyboardDismissBehavior,
  restorationId: restorationId,
  clipBehavior: clipBehavior,