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