onOutput property
Function that is called when the terminal emits data to the underlying program. This is typically caused by user inputs from textInput, keyInput, mouseInput, or paste.
Unless onReply is set, this also receives the data the terminal sends on its own initiative — see there.
Implementation
void Function(String data)? onOutput;