SpacingFixed class

A spacing unit that represents a fixed, unchanging spacing value.

This is the simplest spacing unit - it always returns the same value regardless of layout context or available space.

Implemented types
Available extensions

Constructors

SpacingFixed(double value)
Creates a fixed spacing unit with the specified value.
const

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 double
The fixed spacing value.
final

Methods

clamp({SpacingUnit min = const SpacingFixed(0), SpacingUnit max = const SpacingFixed(double.infinity)}) SpacingUnit

Available on SpacingUnit, provided by the SpacingUnitExtension extension

Constrains this spacing unit within the specified min and max bounds.
computeSpacing({required ParentLayout parent, required LayoutAxis axis, required double viewportSize}) double
Returns the fixed spacing value.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toCodeString() String
Returns a code string representation of this spacing unit.
override
toString() String
A string representation of this object.
inherited

Operators

operator *(Object other) SpacingUnit

Available on SpacingUnit, provided by the SpacingUnitExtension extension

Multiplies two spacing units.
operator +(SpacingUnit other) SpacingUnit

Available on SpacingUnit, provided by the SpacingUnitExtension extension

Adds two spacing units together.
operator -(SpacingUnit other) SpacingUnit

Available on SpacingUnit, provided by the SpacingUnitExtension extension

Subtracts one spacing unit from another.
operator /(SpacingUnit other) SpacingUnit

Available on SpacingUnit, provided by the SpacingUnitExtension extension

Divides one spacing unit by another.
operator ==(Object other) bool
The equality operator.
inherited
operator unary-() SpacingUnit

Available on SpacingUnit, provided by the SpacingUnitExtension extension

Negates this spacing unit (equivalent to 0 - this).