Num.range constructor
Constrains data to numeric values within the range min–max
.
min
the smallest valid number; it must be < max
.
max
the largest valid number; it must be > min
.
mal
"malformed", the error message in case of non-numeric input values;
the default value is 'not a number'.
small
the error message if an input is too small; the default value is
'it cannot be < min
'.
large
the error message if an input is too large; the default value is
'it cannot be > max
'.
Implementation
Num.range(num min, num max, {String? mal, String? small, String? large})
: assert(min < max),
_val = _AsNum(mal, _Logic(min: min, max: max, s: small, l: large).call);