TrackSize class abstract

Base class to describe the width (for columns) or height (for rows) of a track in a RenderLayoutGrid.

To size a track to a specific number of pixels, use a FixedTrackSize. This is the cheapest way to size a track.

Another algorithm that is relatively cheap include FlexibleTrackSize, which distributes the space equally among the flexible tracks.

Mixed in types
Implementers
Annotations

Constructors

TrackSize({String? debugLabel})
Abstract const constructor. This constructor enables subclasses to provide const constructors so that they can be used in const expressions.
const

Properties

debugLabel String?
A label that is included in debug output
final
flex double?
The flex factor to apply to the track if there is any room left over when laying out the grid. The remaining space is distributed to any tracks with flex in proportion to their flex value (higher values get more space).
no setter
hashCode int
The hash code for this object.
no setterinherited
isFlexible bool
Returns whether this sizing function consumes space left over from the initial sizing of the grid.
no setter
isIntrinsic bool
Returns whether this sizing function requires measurement of a track's items to resolve its size.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node.
override
isFixedForConstraints(TrackType type, BoxConstraints gridConstraints) bool
Returns whether this size can resolve to a fixed value provided the grid's box constraints.
maxIntrinsicSize(TrackType type, Iterable<RenderBox> items, {required double crossAxisSizeForItem(RenderBox)}) double
The ideal cross axis size of this track. This must be equal to or greater than the minIntrinsicSize for the same type. The track might be bigger than this size, e.g. if the track is flexible or if the grid's size ends up being forced to be bigger than the sum of all the maxIntrinsicSize values.
minIntrinsicSize(TrackType type, Iterable<RenderBox> items, {double crossAxisSizeForItem(RenderBox)?}) double
The smallest width (for columns) or height (for rows) that a track can have.
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
toStringShort() String
A brief description of this object, usually just the runtimeType and the hashCode.
inherited

Operators

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