RenderBoxyFlex constructor

RenderBoxyFlex({
  1. List<RenderBox>? children,
  2. Axis direction = Axis.horizontal,
  3. MainAxisSize mainAxisSize = MainAxisSize.max,
  4. MainAxisAlignment mainAxisAlignment = MainAxisAlignment.start,
  5. CrossAxisAlignment crossAxisAlignment = CrossAxisAlignment.stretch,
  6. TextDirection? textDirection,
  7. VerticalDirection verticalDirection = VerticalDirection.down,
  8. TextBaseline? textBaseline,
  9. BoxyFlexIntrinsicsBehavior? intrinsicsBehavior,
})

Creates a flex render object.

By default, the flex layout is horizontal and children are aligned to the start of the main axis and the center of the cross axis.

Implementation

RenderBoxyFlex({
  List<RenderBox>? children,
  Axis direction = Axis.horizontal,
  MainAxisSize mainAxisSize = MainAxisSize.max,
  MainAxisAlignment mainAxisAlignment = MainAxisAlignment.start,
  CrossAxisAlignment crossAxisAlignment = CrossAxisAlignment.stretch,
  TextDirection? textDirection,
  VerticalDirection verticalDirection = VerticalDirection.down,
  TextBaseline? textBaseline,
  BoxyFlexIntrinsicsBehavior? intrinsicsBehavior,
})  : _direction = direction,
      _mainAxisAlignment = mainAxisAlignment,
      _mainAxisSize = mainAxisSize,
      _crossAxisAlignment = crossAxisAlignment,
      _textDirection = textDirection,
      _verticalDirection = verticalDirection,
      _textBaseline = textBaseline,
      _intrinsicsBehavior = intrinsicsBehavior ??
          (direction == Axis.vertical
              ? BoxyFlexIntrinsicsBehavior.measureCross
              : BoxyFlexIntrinsicsBehavior.measureMain) {
  addAll(children);
}