Num class
Numeric constraints — limits input data to numeric values.
Examples:
- valid input: "1", "123", "-1", "-9.99"
- invalid input: "A", "12A", "12.A3"
Constructors
- Num.new({String? mal})
- Constrains data to numeric values.
- Num.max(num max, {String? mal, String? large})
-
Constrains data to numeric values that are less than or equal to
max
. - Num.min(num min, {String? mal, String? small})
-
Constrains data to numeric values greater than or equal to
min
. - Num.neg({String? mal, String? pos})
- Constrains data to negative numbers (zero excluded).
- Num.pos({String? mal, String? neg})
- Constrains data to positive numbers (zero included).
- Num.range(num min, num max, {String? mal, String? small, String? large})
-
Constrains data to numeric values within the range
min–max
.
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
-
call(
String? input) → String? -
Valid — returns null – if
input
is either numeric or null. -
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.
inherited