conditionalTextInput static method

KeyBindings conditionalTextInput({
  1. required TextInputBuffer buffer,
  2. required bool isEnabled(),
  3. void onInput()?,
})

Creates conditional text input bindings (only active when condition is true).

Useful for search fields that can be toggled on/off.

Implementation

static KeyBindings conditionalTextInput({
  required TextInputBuffer buffer,
  required bool Function() isEnabled,
  void Function()? onInput,
}) {
  return textInput(
      buffer: () => buffer, isEnabled: isEnabled, onInput: onInput);
}