SpacedFlex constructor

const SpacedFlex({
  1. Key? key,
  2. required Axis direction,
  3. Clip clipBehavior = Clip.hardEdge,
  4. MainAxisAlignment mainAxisAlignment = MainAxisAlignment.start,
  5. MainAxisSize mainAxisSize = MainAxisSize.max,
  6. CrossAxisAlignment crossAxisAlignment = CrossAxisAlignment.center,
  7. TextDirection? textDirection,
  8. VerticalDirection verticalDirection = VerticalDirection.down,
  9. TextBaseline? textBaseline,
  10. List<Widget>? children,
  11. double? spaceBetween,
  12. EdgeInsets? padding,
})

Creates a flex layout with spaces.

The direction is required.

The direction, mainAxisAlignment, crossAxisAlignment, and verticalDirection arguments must not be null. If crossAxisAlignment is CrossAxisAlignment.baseline, then textBaseline must not be null.

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.

A padding can be defined to add space around children.

The spaceBetween will add this amount of space between all children.

Implementation

const SpacedFlex({
  Key? key,
  required this.direction,
  this.clipBehavior = Clip.hardEdge,
  this.mainAxisAlignment = MainAxisAlignment.start,
  this.mainAxisSize = MainAxisSize.max,
  this.crossAxisAlignment = CrossAxisAlignment.center,
  this.textDirection,
  this.verticalDirection = VerticalDirection.down,
  this.textBaseline,
  this.children,
  this.spaceBetween,
  this.padding,
}) : sizeBetween = null;