enableRawMode method

  1. @override
void enableRawMode()
override

Turns off echo and line buffering, so each key arrives as it's typed.

Implementation

@override
void enableRawMode() {
  try {
    _echoMode ??= stdin.echoMode;
    _lineMode ??= stdin.lineMode;
    stdin.echoMode = false;
    stdin.lineMode = false;
  } on StdinException {
    // Not a terminal after all. Lines can still be read, without editing.
  }
}