Scrollable constructor Null safety

const Scrollable(
  1. {Key? key,
  2. AxisDirection axisDirection,
  3. ScrollController? controller,
  4. ScrollPhysics? physics,
  5. required ViewportBuilder viewportBuilder,
  6. ScrollIncrementCalculator? incrementCalculator,
  7. bool excludeFromSemantics,
  8. int? semanticChildCount,
  9. DragStartBehavior dragStartBehavior,
  10. String? restorationId,
  11. ScrollBehavior? scrollBehavior}
)

Creates a widget that scrolls.

The axisDirection and viewportBuilder arguments must not be null.

Implementation

const Scrollable({
  Key? key,
  this.axisDirection = AxisDirection.down,
  this.controller,
  this.physics,
  required this.viewportBuilder,
  this.incrementCalculator,
  this.excludeFromSemantics = false,
  this.semanticChildCount,
  this.dragStartBehavior = DragStartBehavior.start,
  this.restorationId,
  this.scrollBehavior,
}) : assert(axisDirection != null),
     assert(dragStartBehavior != null),
     assert(viewportBuilder != null),
     assert(excludeFromSemantics != null),
     assert(semanticChildCount == null || semanticChildCount >= 0),
     super (key: key);