mulChecked method

Uint32 mulChecked(
  1. Uint32 other
)

Evaluates exact strict mathematical bounding conditions without truncating natively.

Implementation

Uint32 mulChecked(Uint32 other) {
  final result = value * other.value;
  if (result > 4294967295 || result < 0) throw StateError('Uint32 multiplication overflow');
  return Uint32.from(result);
}