stop method
Implementation
Future<void> stop() async {
try {
await _inputSubscription?.cancel();
_inputSubscription = null;
// Restore terminal mode only if we have a terminal
if (stdin.hasTerminal) {
stdin.echoMode = true;
stdin.lineMode = true;
}
if (verbose) {
print('⌨️ Terminal input forwarding stopped');
}
} catch (e) {
if (verbose) {
print('⚠️ Error stopping input forwarding: $e');
}
// Don't throw - this is cleanup
}
}