cast method
Casts the argument to this data type, otherwise throw an ArgumentError.
Implementation
@override
BigInt cast(dynamic value) {
if (value is BigInt) {
return value;
} else if (value is num) {
return BigInt.from(value);
} else if (value is String) {
return BigInt.tryParse(value) ?? super.cast(value);
}
return super.cast(value);
}