checkUint32 static method
Throws if value
is null
, or if value
is not an unsigned
32 bit integer.
If name
is supplied, it is used as the parameter name
in the error message.
Returns the value
if it is not null and if it is an
unsigned 32 bit integer.
Implementation
static int checkUint32(Object? value, [String? name]) {
final intValue = ArgumentErrorUtils.checkType<int>(value, name: name);
if (intValue.isUint32) return intValue;
throw ArgumentError.value(
intValue,
name,
"Must be an unsigned 32 bit integer.",
);
}