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
-
- Object
- Directive<
num> - NumberDirective
- ClampNumberDirective
Constructors
- ClampNumberDirective(num min, num max)
Properties
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