Flex class abstract

Controls how a flex item consumes available space inside a flex container.

This maps to the CSS flex property and related properties like flex-grow, flex-shrink, and flex-basis.

Read more: MDN Flex Item

Constructors

Flex({double? grow, double? shrink, Unit? basis})
Create a flex value from grow/shrink/basis components.
const
factory
Flex.basis(Unit basis)
Create a flex value with the given basis.
const
factory
Flex.grow(double grow)
Create a flex value with the given grow factor.
const
factory
Flex.shrink(double shrink)
Create a flex value with the given shrink factor.
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
styles Map<String, String>
no setter

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 Flex
The item can grow and shrink, and uses its base size.
inherit → const Flex
initial → const Flex
none → const Flex
The item is inflexible and uses its base size.
revert → const Flex
revertLayer → const Flex
unset → const Flex