Length class
This is the one actually used by users. Contains a value and a unit
Constructors
- Length(double value, {LengthUnit unit = LengthUnit.px})
-
const
Properties
- hashCode → int
-
The hash code for this object.
no setteroverride
- isAbsolute → bool
-
does not depend on parent dimension (no % unit)
no setteroverride
- isLocal → bool
-
does not depend on viewport size (no VH,VW,VMIN,VMAX unit)
no setteroverride
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- unit → LengthUnit
-
final
- value → double
-
final
Methods
-
add(
Dimension other) → Dimension? -
inherited
-
copyWith(
{double? value, LengthUnit? unit}) → Length -
getUnit(
) → String -
lerpFrom(
Dimension? a, double t) → Dimension? -
override
-
lerpTo(
Dimension? b, double t) → Dimension? -
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
scale(
double t) → Length -
override
-
toJson(
) → String -
override
-
toPX(
{double? constraint, Size? screenSize}) → double -
override
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator +(
Dimension other) → Dimension -
inherited
-
operator -(
Dimension other) → Dimension -
inherited
-
operator ==(
dynamic other) → bool -
The equality operator.
override
-
operator unary-(
) → Length -
override