RenderWrap constructor Null safety

RenderWrap(
  1. {List<RenderBox>? children,
  2. Axis direction = Axis.horizontal,
  3. WrapAlignment alignment = WrapAlignment.start,
  4. double spacing = 0.0,
  5. WrapAlignment runAlignment = WrapAlignment.start,
  6. double runSpacing = 0.0,
  7. WrapCrossAlignment crossAxisAlignment = WrapCrossAlignment.start,
  8. TextDirection? textDirection,
  9. VerticalDirection verticalDirection = VerticalDirection.down,
  10. 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);
}