CssLength class sealed
CSS length/size value type.
- Implemented types
Constructors
- CssLength.calc(String expression)
-
CSS calc() function.
factory
- CssLength.ch(num value)
-
Character units (width of '0').
factory
- CssLength.clamp(CssLength min, CssLength preferred, CssLength max)
-
CSS clamp() function.
factory
- CssLength.dvh(num value)
-
Dynamic viewport height (accounts for browser UI).
factory
- CssLength.dvw(num value)
-
Dynamic viewport width (accounts for browser UI).
factory
- CssLength.em(num value)
-
Em units (relative to element font size).
factory
- CssLength.ex(num value)
-
Ex units (x-height of font).
factory
- CssLength.fitContentArg(CssLength value)
-
fit-content() function with argument.
factory
- CssLength.global(CssGlobal global)
-
Global keyword (inherit, initial, unset, revert).
factory
- CssLength.lh(num value)
-
Line height units.
factory
- CssLength.lvh(num value)
-
Large viewport height.
factory
- CssLength.lvw(num value)
-
Large viewport width.
factory
-
CssLength.max(List<
CssLength> values) -
CSS max() function.
factory
-
CssLength.min(List<
CssLength> values) -
CSS min() function.
factory
- CssLength.percent(num value)
-
Percentage.
factory
- CssLength.px(num value)
-
Pixel value.
factory
- CssLength.raw(String value)
-
Raw CSS value escape hatch.
factory
- CssLength.rem(num value)
-
Rem units (relative to root font size).
factory
- CssLength.rlh(num value)
-
Root line height units.
factory
- CssLength.svh(num value)
-
Small viewport height.
factory
- CssLength.svw(num value)
-
Small viewport width.
factory
- CssLength.variable(String varName)
-
CSS variable reference.
factory
- CssLength.vh(num value)
-
Viewport height percentage.
factory
- CssLength.vmax(num value)
-
Viewport maximum (larger of vw or vh).
factory
- CssLength.vmin(num value)
-
Viewport minimum (smaller of vw or vh).
factory
- CssLength.vw(num value)
-
Viewport width percentage.
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
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toCss(
) → String -
Converts this value to its CSS string representation.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Constants
- auto → const CssLength
- fitContent → const CssLength
- maxContent → const CssLength
- minContent → const CssLength
- none → const CssLength
- zero → const CssLength
- Zero length (no unit needed).