dart2raw method
- dynamic value
Implementation
@override
int dart2raw(value) {
if (value is int) return value;
if (value is BigInt) {
if (value > _maxI64b) {
// unsigned bigint (64 bits) to two's complement signed integer
value -= _maxI64b;
value -= BigInt.one;
return value.toInt() + _minI64;
} else {
return value.toInt();
}
}
throw ArgumentError.value(value);
}