DirectFlexItem class

Inheritance
Implemented types

Constructors

DirectFlexItem.new({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.
const

Properties

alignSelf BoxAlignmentGeometry?
The cross-axis alignment for this specific item. Overrides the FlexBox.alignItems property for this individual child. If null, uses the parent's alignItems setting.
final
aspectRatio double?
The aspect ratio constraint for this item. If specified, the item's width and height will be constrained to maintain this aspect ratio (width/height). This is useful for responsive design.
final
bottom PositionUnit?
The offset from the bottom edge of the parent container. Used for sticky positioning within the flex container.
final
child Widget
The widget below this widget in the tree.
finalinherited
debugTypicalAncestorWidgetClass Type
The typical ancestor widget class for this widget.
no setteroverride
debugTypicalAncestorWidgetDescription String
Describes the RenderObjectWidget that is typically used to set up the ParentData that applyParentData will write to.
no setterinherited
flexGrow double
The flex grow factor for this item. Determines how much this item should grow relative to its siblings when there is extra space available in the main axis. A value of 0 means the item will not grow. Default is 0.0.
final
flexShrink double
The flex shrink factor for this item. Determines how much this item should shrink relative to its siblings when there is insufficient space in the main axis. A value of 0 means the item will not shrink. Default is 0.0.
final
hashCode int
The hash code for this object.
no setterinherited
height SizeUnit?
The preferred height of this flex item. If null, the item will size itself based on its content and flex properties.
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
left PositionUnit?
The offset from the left edge of the parent container. Used for sticky positioning within the flex container.
final
maxHeight SizeUnit?
The maximum height constraint for this flex item. The item will not be sized larger than this value.
final
maxWidth SizeUnit?
The maximum width constraint for this flex item. The item will not be sized larger than this value.
final
minHeight SizeUnit?
The minimum height constraint for this flex item. The item will not be sized smaller than this value.
final
minWidth SizeUnit?
The minimum width constraint for this flex item. The item will not be sized smaller than this value.
final
needLayoutBox bool
final
paintOrder int?
The order in which this item should be painted relative to its siblings. Lower values are painted first (behind), higher values are painted last (on top). Items with the same paint order are painted in document order.
final
The offset from the right edge of the parent container. Used for sticky positioning within the flex container.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
top PositionUnit?
The offset from the top edge of the parent container. Used for sticky positioning within the flex container.
final
width SizeUnit?
The preferred width of this flex item. If null, the item will size itself based on its content and flex properties.
final

Methods

applyParentData(RenderObject renderObject) → void
Applies the flex item configuration to the child's parent data.
override
createElement() ParentDataElement<LayoutBoxParentData>
Inflates this configuration to a concrete instance.
inherited
debugCanApplyOutOfTurn() bool
Whether the ParentDataElement.applyWidgetOutOfTurn method is allowed with this widget.
inherited
debugDescribeChildren() List<DiagnosticsNode>
Returns a list of DiagnosticsNode objects describing this node's children.
inherited
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node.
inherited
debugIsValidRenderObject(RenderObject renderObject) bool
Checks if this widget can apply its parent data to the provided renderObject.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toDiagnosticsNode({String? name, DiagnosticsTreeStyle? style}) DiagnosticsNode
Returns a debug representation of the object that is used by debugging tools and by DiagnosticsNode.toStringDeep.
inherited
toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) String
A string representation of this object.
inherited
toStringDeep({String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug, int wrapWidth = 65}) String
Returns a string representation of this node and its descendants.
inherited
toStringShallow({String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) String
Returns a one-line detailed description of the object.
inherited
toStringShort() String
A short, textual description of this widget.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited