RenderFlex constructor
- List<
RenderBox> ? children, - Axis direction = Axis.horizontal,
- MainAxisSize mainAxisSize = MainAxisSize.max,
- MainAxisAlignment mainAxisAlignment = MainAxisAlignment.start,
- CrossAxisAlignment crossAxisAlignment = CrossAxisAlignment.center,
- TextDirection? textDirection,
- VerticalDirection verticalDirection = VerticalDirection.down,
- TextBaseline? textBaseline,
- Clip clipBehavior = Clip.none,
- double spacing = 0.0,
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
RenderFlex({
List<RenderBox>? children,
this._direction = Axis.horizontal,
this._mainAxisSize = MainAxisSize.max,
this._mainAxisAlignment = MainAxisAlignment.start,
this._crossAxisAlignment = CrossAxisAlignment.center,
this._textDirection,
this._verticalDirection = VerticalDirection.down,
this._textBaseline,
this._clipBehavior = Clip.none,
double spacing = 0.0,
}) : _spacing = spacing,
assert(spacing >= 0.0) {
addAll(children);
}