Controller class Null safety

The main controller for the application. This abstract class is implemented by a RealController for normal calculator, and by by RunningController, which manages a running calculator program.



Controller(Model<Operation> model)


hashCode int
The hash code for this object. [...]
read-only, inherited
keyboard KeyboardController
model Model<Operation>
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
state ControllerState
read / write


buttonDown(Operation key) → void
Handle an operation due to a press on the keyboard.
buttonUp() → void
Finish the operation started by buttonDown. This is meaningful for some keys, like SST, show-hex and clear-prefix.
handlePSE() → void
Handle the pause operation. Note that this enables stack lift -- see p. 100
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
pasteToX(String clipboard) bool
reset() → void
Reset everything but the state of the state machine
resetAll() → void
runWithArg(OperationArg arg, LimitedState fromState) → void
Run the operation arg.op when its argument is available. When running a program, that's now.
showCalculatorError(CalculatorError e) → void
Show an error on the LCD screen.
showMessage(String message) → void
Show a message on the LCD screen.
singleStep(DigitEntry? digitEntryStateFrom) → void
Perform a single step action by running one instruction, and then returning to an appropriate state (DigitEntry or Running, as determined by the executed instruction).
toString() String
A string representation of this object. [...]


operator ==(Object other) bool
The equality operator. [...]