toTextInputBindings method

KeyBindings toTextInputBindings({
  1. void onInput()?,
  2. void onTextChanged()?,
})

Creates text input bindings that delegate to a TextInputBuffer.

Handles typing, backspace, and horizontal cursor movement. Recognized no-op edits are consumed; onInput runs only on state changes. onTextChanged excludes cursor-only changes.

Implementation

KeyBindings toTextInputBindings({
  void Function()? onInput,
  void Function()? onTextChanged,
}) {
  return KeyBindings.textInput(
      buffer: () => this, onInput: onInput, onTextChanged: onTextChanged);
}