ClampNumberDirective class final

Clamps a numeric value between min and max bounds.

Throws ArgumentError if min or max is not finite, or if min is greater than max.

Inspired by CSS clamp() function.

Inheritance

Constructors

ClampNumberDirective(num min, num max)

Properties

hashCode int
The hash code for this object.
no setteroverride
key String
The unique identifier for this directive type.
no setteroverride
max num
final
min num
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

apply(num value) num
Applies the transformation to the given value.
override
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 ==(Object other) bool
The equality operator.
override