mulChecked method
- Int8 other
Evaluates exact strict mathematical bounding conditions without truncating natively.
Implementation
Int8 mulChecked(Int8 other) {
final result = value * other.value;
if (result > 127 || result < -128){
throw StateError('Int8 multiplication overflow');
}
return Int8.from(result);
}