subChecked method

U32 subChecked(
  1. U32 other
)

Implementation

U32 subChecked(U32 other) {
  var result = value - other.value;
  if (result < 0) throw StateError('U32 subtraction underflow');
  return U32(result);
}