carpenter_units library

Classes

AngleUnit
A physical angle that can be converted without a rendering context.
Degrees
An angle expressed in degrees.
Em
A value relative to the effective em of the current element.
LengthUnit
A physical length that can be resolved in a typography context.
LengthUnitContext
Runtime values required to resolve relative length units.
Milliseconds
A duration expressed in milliseconds.
Px
An absolute logical-pixel value.
Radians
An angle expressed in radians.
Rem
A value relative to the root rem configured for the widget subtree.
Seconds
A duration expressed in seconds.
TimeUnit
A physical time value that can be converted to a Dart Duration.
Turns
An angle expressed in complete turns.
Unit
A typed physical UI quantity.
UnitsHandle
Resolves typed units and mutates the local em declaration of an element.
UnitsRoot
Configures the root rem value for a subtree.

Extensions

UnitLiterals on num
Numeric literals for typed units.
UnitsBuildContext on BuildContext
Adds context.units(...), context.units.set(...), and context.units.reset().

Exceptions / Errors

MissingUnitContextException
Thrown when a relative unit lacks required runtime context.
UnitParseException
A parse failure with the source representation that caused it.