addChecked method

Int128 addChecked(
  1. Int128 other
)

Implementation

Int128 addChecked(Int128 other) {
  final overflow =
      isNegative == other.isNegative &&
      (this + other).isNegative != isNegative;
  final r = this + other;
  if (overflow) throw IntegerError.overflow;
  return r;
}