buttonWidgetDown method Null safety

  1. @override
void buttonWidgetDown(
  1. CalculatorButton b
)
override

Implementation

@override
void buttonWidgetDown(CalculatorButton b) {
  if (b is! CalculatorButtonHyperbolic) {
    if (model.userMode) {
      final Operation op = model.shift.select(b);
      buttonDown(_userModeSwapped[op] ?? op);
    } else {
      super.buttonWidgetDown(b);
    }
  } else if (lastKey == Operations15.hyp) {
    buttonDown(b.hyperOp);
  } else if (lastKey == Operations15.hypInverse) {
    buttonDown(b.inverseHyperOp);
  } else {
    super.buttonWidgetDown(b);
  }
}