SpacingViewport class

A spacing unit that matches the viewport size along the specified axis.

Returns the viewport width for horizontal axis, viewport height for vertical axis.

Implemented types
Available extensions

Constructors

SpacingViewport()
Creates a viewport-sized spacing unit.
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

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 viewport size along the axis.
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).