Wrap constructor

const Wrap({
  1. Key? key,
  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,
  11. List<Widget> children = const <Widget>[],
})

Creates a wrap layout.

By default, the wrap layout is horizontal and both the children and the runs are aligned to the start.

The textDirection argument defaults to the ambient Directionality, if any. If there is no ambient directionality, and a text direction is going to be necessary to decide which direction to lay the children in or to disambiguate start or end values for the main or cross axis directions, the textDirection must not be null.

Implementation

const Wrap({
  super.key,
  this.direction = Axis.horizontal,
  this.alignment = WrapAlignment.start,
  this.spacing = 0.0,
  this.runAlignment = WrapAlignment.start,
  this.runSpacing = 0.0,
  this.crossAxisAlignment = WrapCrossAlignment.start,
  this.textDirection,
  this.verticalDirection = VerticalDirection.down,
  this.clipBehavior = Clip.none,
  super.children,
});