JustifyContent enum
The CSS justify-content property defines how the browser distributes space between and around content items along
the main axis of a flex container and the inline axis of grid and multicol containers.
Read more: MDN justify-content
Values
- center → const JustifyContent
-
The items are packed flush to each other toward the center of the alignment container along the main axis.
const JustifyContent('center') - start → const JustifyContent
-
The items are packed flush to each other toward the start edge of the alignment container in the main axis.
const JustifyContent('start') - end → const JustifyContent
-
The items are packed flush to each other toward the end edge of the alignment container in the main axis.
const JustifyContent('end') - left → const JustifyContent
-
The items are packed flush to each other toward the left edge of the alignment container. When the property's horizontal axis is not parallel with the inline axis, such as when
flex-direction: columnis set, this value behaves like start.const JustifyContent('left') - right → const JustifyContent
-
The items are packed flush to each other toward the right edge of the alignment container in the appropriate axis. If the property's axis is not parallel with the inline axis (in a grid container) or the main-axis (in a flexbox container), this value behaves like start.
const JustifyContent('right') - normal → const JustifyContent
-
Behaves as stretch, except in the case of multi-column containers with a non-auto column-width, in which case the columns take their specified column-width rather than stretching to fill the container. As stretch behaves as start in flex containers, normal also behaves as start.
const JustifyContent('normal') - spaceBetween → const JustifyContent
-
The items are evenly distributed within the alignment container along the main axis. The spacing between each pair of adjacent items is the same. The first item is flush with the main-start edge, and the last item is flush with the main-end edge.
const JustifyContent('space-between') - spaceAround → const JustifyContent
-
The items are evenly distributed within the alignment container along the main axis. The spacing between each pair of adjacent items is the same. The empty space before the first and after the last item equals half of the space between each pair of adjacent items. If there is only one item, it will be centered.
const JustifyContent('space-around') - spaceEvenly → const JustifyContent
-
The items are evenly distributed within the alignment container along the main axis. The spacing between each pair of adjacent items, the main-start edge and the first item, and the main-end edge and the last item, are all exactly the same.
const JustifyContent('space-evenly') - stretch → const JustifyContent
-
If the combined size of the items along the main axis is less than the size of the alignment container, any auto-sized items have their size increased equally (not proportionally), while still respecting the constraints imposed by max-height/max-width (or equivalent functionality), so that the combined size exactly fills the alignment container along the main axis.
const JustifyContent('stretch') - inherit → const JustifyContent
-
const JustifyContent('inherit') - initial → const JustifyContent
-
const JustifyContent('initial') - revert → const JustifyContent
-
const JustifyContent('revert') - revertLayer → const JustifyContent
-
const JustifyContent('revert-layer') - unset → const JustifyContent
-
const JustifyContent('unset')
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- index → int
-
A numeric identifier for the enumerated value.
no setterinherited
- name → String
-
Available on Enum, provided by the EnumName extension
The name of the enum value.no setter - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- value → String
-
The css value
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
-
values
→ const List<
JustifyContent> - A constant List of the values in this enum, in order of their declaration.