handleInput method

  1. @override
bool handleInput(
  1. String input
)
override

Handle input from the user during the interactive session Returns true if input was handled, false if session should exit

Implementation

@override
bool handleInput(String input) {
  if (!_isActive) return false;

  input = input.trim().toLowerCase();

  if (input == 'q' || input == 'quit') {
    _output.writeln(green.wrap("Monitor session stopped"));
    exit();
    return false;
  }

  _output.writeln(cyan.wrap("Type 'q' to quit monitoring"));
  return true;
}