Int64.fromBigInt constructor
Int64.fromBigInt(
- BigInt value
Builds from an arbitrary signed BigInt, truncating to 64 bits like
a wrapping cast — mirrors Int32.fromBigInt / Int128.fromBigInt.
BigInt.toUnsigned gives the exact two's-complement bit pattern
directly, so this is correct for any magnitude/sign.
Implementation
factory Int64.fromBigInt(BigInt value) =>
Int64._(Uint64.fromBigInt(value.toUnsigned(64)));