parseNumber static method
Implementation
static BigInt parseNumber(dynamic arg) {
if (arg is String) {
if (utils.isHexPrefixed(arg)) {
return decodeBigInt(hex.decode(utils.stripHexPrefix(arg)));
} else {
return BigInt.parse(arg, radix: 10);
}
} else if (arg is int) {
return BigInt.from(arg);
} else if (arg is BigInt) {
return arg;
} else {
throw new ArgumentError('Argument is not a number');
}
}