DirectFlexItem constructor
- Key? key,
- int? paintOrder,
- SizeUnit? width,
- SizeUnit? height,
- SizeUnit? minWidth,
- SizeUnit? maxWidth,
- SizeUnit? minHeight,
- SizeUnit? maxHeight,
- double flexGrow = 0.0,
- double flexShrink = 0.0,
- double? aspectRatio,
- PositionUnit? top,
- PositionUnit? left,
- PositionUnit? bottom,
- PositionUnit? right,
- BoxAlignmentGeometry? alignSelf,
- bool needLayoutBox = false,
- required Widget child,
Creates a DirectFlexItem with the specified properties.
The child
parameter is required and specifies the widget to be laid out
within the flex container.
The paintOrder
parameter controls the painting order relative to siblings.
Lower values are painted first.
The width
and height
parameters specify the preferred size of the item.
If null, the size is determined by content and flex properties.
The minWidth
, maxWidth
, minHeight
, maxHeight
parameters set size
constraints for the item.
The flexGrow
parameter controls how much this item grows relative to
siblings when there is extra space. Default is 0.0.
The flexShrink
parameter controls how much this item shrinks relative to
siblings when there is insufficient space. Default is 0.0.
The aspectRatio
parameter maintains the width/height ratio if specified.
The top
, left
, bottom
, right
parameters are for sticky positioning.
The alignSelf
parameter overrides the parent's alignItems for this item.
The needLayoutBox
parameter determines if the child needs layout box info.
Implementation
const DirectFlexItem({
super.key,
this.paintOrder,
this.width,
this.height,
this.minWidth,
this.maxWidth,
this.minHeight,
this.maxHeight,
this.flexGrow = 0.0,
this.flexShrink = 0.0,
this.aspectRatio,
this.top,
this.left,
this.bottom,
this.right,
this.alignSelf,
this.needLayoutBox = false,
required super.child,
});