handleNumberKey method Null safety

  1. @override
void handleNumberKey(
  1. int num
)
override

Implementation

@override
void handleNumberKey(final int num) {
  if (num >= model.displayMode.radix) {
    return;
  }
  final int? e = _exponent;
  if (e == null) {
    _tryNewValue(
        _entered + num.toRadixString(16), _sign, e, _negativeExponent);
  } else if (num < 10) {
    if (_negativeExponent) {
      _tryNewValue(_entered, _sign, -(((-e) * 10 + num) % 100), true);
    } else {
      _tryNewValue(_entered, _sign, (e * 10 + num) % 100, false);
    }
  }
}