valueAsBigInt<T extends BigInt?> static method
Implementation
static T valueAsBigInt<T extends BigInt?>(Object? value,
{bool allowHex = false}) {
if (value is T) return value;
if (value == null && _isNull<T>()) return null as T;
final toBigint = BigintUtils.tryParse(value, allowHex: allowHex);
if (toBigint == null) {
throw JSONHelperException("Failed to parse value as bigint.");
}
return toBigint as T;
}