Hex.range constructor
Constrains the input data to the hex-digits 0-9A–F
and its length
(number of hex-digits) within the range min–max
.
min
the minimum number of hex-digits; it must be > 0 and < max
.
max
the maximum number of hex-digits; it must be > 0 and > min
.
mal
the error message if non-hex characters are found; the default value
is 'non-hex-digit character(s) found'.
short
the error message if the input length is shorter than min
digits.
long
the error message if the input length is longer than max
digits.
Implementation
Hex.range(int min, int max, {String? mal, String? short, String? long})
: assert(min > 0),
assert(max > 0),
assert(max > min),
_valHex = _HexImpl(
mal,
Len.range(min, max, short: short, long: long),
);