swapXY method Null safety

void swapXY()

Implementation

void swapXY() {
  void f(final List<Value>? st) {
    if (st != null) {
      Value t = st[0];
      st[0] = st[1];
      st[1] = t;
    }
  }

  f(_stack);
  f(_imaginaryStack);
  display.window = 0;
  needsSave = true;
  _clxDone = false;
}