isComplexMode property Null safety

bool isComplexMode
inherited

Implementation

bool get isComplexMode => _imaginaryStack != null;
  1. @override
void isComplexMode=(bool v)
override

Implementation

@override
set isComplexMode(bool v) {
  if (v && !isComplexMode) {
    memory.policy.checkAvailable(5);
    // Might throw CalculatorError
  }
  if (v != isComplexMode) {
    setupComplex(
        v ? List<Value>.filled(4, Value.zero, growable: false) : null);
  }
  super.setFlag(8, v);
}