RenderWrap constructor Null safety
- {List<
RenderBox> ? children, - Axis direction = Axis.horizontal,
- WrapAlignment alignment = WrapAlignment.start,
- double spacing = 0.0,
- WrapAlignment runAlignment = WrapAlignment.start,
- double runSpacing = 0.0,
- WrapCrossAlignment crossAxisAlignment = WrapCrossAlignment.start,
- TextDirection? textDirection,
- VerticalDirection verticalDirection = VerticalDirection.down,
- Clip clipBehavior = Clip.none}
Creates a wrap render object.
By default, the wrap layout is horizontal and both the children and the runs are aligned to the start.
Implementation
RenderWrap({
List<RenderBox>? children,
Axis direction = Axis.horizontal,
WrapAlignment alignment = WrapAlignment.start,
double spacing = 0.0,
WrapAlignment runAlignment = WrapAlignment.start,
double runSpacing = 0.0,
WrapCrossAlignment crossAxisAlignment = WrapCrossAlignment.start,
TextDirection? textDirection,
VerticalDirection verticalDirection = VerticalDirection.down,
Clip clipBehavior = Clip.none,
}) : assert(direction != null),
assert(alignment != null),
assert(spacing != null),
assert(runAlignment != null),
assert(runSpacing != null),
assert(crossAxisAlignment != null),
assert(clipBehavior != null),
_direction = direction,
_alignment = alignment,
_spacing = spacing,
_runAlignment = runAlignment,
_runSpacing = runSpacing,
_crossAxisAlignment = crossAxisAlignment,
_textDirection = textDirection,
_verticalDirection = verticalDirection,
_clipBehavior = clipBehavior {
addAll(children);
}