Skip to content

Input fields: select all text on tap/focus #194

Closed
@M-Ahal

Description

@M-Ahal

For input field widgets such as:

  • ReactiveTextField
  • ReactiveFlutterTypeahead
  • ...

How can I customize the behavior to select all the text when the field it tapped on (and consequently, focussed)?
At the moment I can only think of the following approach:

  1. Providing an external TextEdittingController
  2. Wrapping the whole field in a FocusableActionDetector
  3. selecting all the text in the onShowFocusHighlight callback of the FocusableActionDetector

I feel that this might introduce the boilerplate that this package + the code-gen variant aims to solve.

Any ideas on how this can be solved?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions