TrackSize class

Represents the size of a grid track in a grid layout.

Use the static members to create different types of track sizes:

Read more: MDN Grid Tracks

Constructors

TrackSize(Unit value)
Creates a track size with a fixed value.
const
factory
TrackSize.fitContent(Unit value)
Creates a track size that fits content within the specified value.
const
factory
TrackSize.fr(double value)
Creates a track size that is a fraction of the available space.
const
factory
TrackSize.minmax(TrackSize min, TrackSize max)
Creates a track size that defines a size range greater than or equal to min and less than or equal to max. If max is smaller than min, then max is ignored and the function is treated as min. As a maximum, a flex value sets the track's flex factor. It is invalid as a minimum.
const
factory

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
value String
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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

Constants

auto → const TrackSize
A track size that is automatically determined. In most cases, this behaves similarly to minmax(min-content,max-content).
maxContent → const TrackSize
A track size representing the largest maximal content contribution of the grid items occupying the grid track.
minContent → const TrackSize
A track size representing the largest minimal content contribution of the grid items occupying the grid track.