toInt128 method

Int128 toInt128()

Sign-extending widen — same bit pattern as toUint128, just relabelled signed.

Implementation

Int128 toInt128() {
  final ext = isNegative ? Uint64.max : Uint64.zero;
  return Int128.unsafe(Uint128.unsafe(ext, _bits));
}