addChecked method

Int64 addChecked(
  1. Int64 other
)

Implementation

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