SpacingUnit class abstract
- Available extensions
Constructors
- SpacingUnit.computed({required SpacingUnit first, required SpacingUnit second, required CalculationOperation operation})
-
Creates a calculated spacing using two operands and an operation.
constfactory
- SpacingUnit.constrained({required SpacingUnit spacing, SpacingUnit min, SpacingUnit max})
-
Creates a constrained spacing with min/max bounds.
constfactory
- SpacingUnit.fixed(double value)
-
Creates a fixed spacing with the specified value.
constfactory
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
-
clamp(
{SpacingUnit min = const _FixedSpacing(0), SpacingUnit max = const _FixedSpacing(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 maxSpace, required double availableSpace, required int affectedCount}) → double - Computes the actual spacing value.
-
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 *(
SpacingUnit 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).
Static Methods
-
lerp(
SpacingUnit a, SpacingUnit b, double t) → SpacingUnit - Linearly interpolates between two spacing units.
Constants
- viewportSize → const SpacingUnit
- Spacing equal to the viewport size along the axis.
- zero → const SpacingUnit
- Zero spacing.