addChecked method

Uint64 addChecked(
  1. Uint64 other
)

Throws IntegerError instead of wrapping on overflow.

Implementation

Uint64 addChecked(Uint64 other) {
  final r = this + other;
  if (r < this) throw CoreErrors.integerOverflow;
  return r;
}