SingleChildScrollView constructor
- Key? key,
- Axis scrollDirection = Axis.vertical,
- bool reverse = false,
- EdgeInsetsGeometry? padding,
- bool? primary,
- ScrollPhysics? physics,
- ScrollController? controller,
- Widget? child,
- DragStartBehavior dragStartBehavior = DragStartBehavior.start,
- Clip clipBehavior = Clip.hardEdge,
- HitTestBehavior hitTestBehavior = HitTestBehavior.opaque,
- String? restorationId,
- ScrollViewKeyboardDismissBehavior keyboardDismissBehavior = ScrollViewKeyboardDismissBehavior.manual,
Creates a box in which a single widget can be scrolled.
Implementation
const SingleChildScrollView({
super.key,
this.scrollDirection = Axis.vertical,
this.reverse = false,
this.padding,
this.primary,
this.physics,
this.controller,
this.child,
this.dragStartBehavior = DragStartBehavior.start,
this.clipBehavior = Clip.hardEdge,
this.hitTestBehavior = HitTestBehavior.opaque,
this.restorationId,
this.keyboardDismissBehavior = ScrollViewKeyboardDismissBehavior.manual,
}) : assert(
!(controller != null && (primary ?? false)),
'Primary ScrollViews obtain their ScrollController via inheritance '
'from a PrimaryScrollController widget. You cannot both set primary to '
'true and pass an explicit controller.',
);