Scrollable constructor Null safety
- {Key? key,
- AxisDirection axisDirection = AxisDirection.down,
- ScrollController? controller,
- ScrollPhysics? physics,
- required ViewportBuilder viewportBuilder,
- ScrollIncrementCalculator? incrementCalculator,
- bool excludeFromSemantics = false,
- int? semanticChildCount,
- DragStartBehavior dragStartBehavior = DragStartBehavior.start,
- String? restorationId,
- ScrollBehavior? scrollBehavior,
- Clip clipBehavior = Clip.hardEdge}
Creates a widget that scrolls.
The axisDirection and viewportBuilder arguments must not be null.
Implementation
const Scrollable({
super.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,
this.clipBehavior = Clip.hardEdge,
}) : assert(axisDirection != null),
assert(dragStartBehavior != null),
assert(viewportBuilder != null),
assert(excludeFromSemantics != null),
assert(semanticChildCount == null || semanticChildCount >= 0);