attach method

void attach(
  1. TerminalEngine engine
)

Wire the controller to an engine. One-shot: re-attach without an intervening dispose is a programmer error.

Implementation

void attach(TerminalEngine engine) {
  assert(_engine == null, 'attach called twice');
  _engine = engine;
  // No notify — attach is the binding step, not a state change.
}