Skip to content

Add TextInputType.none #83567

Description

@jpnurmi

Use case

It would be great to be able to disable the virtual keyboard for certain TextFields.

Proposal

Introduce TextInputType.none that can be specified as the keyboard type for TextField. Flutter should not open the virtual keyboard when such text field gains focus.

In order to avoid the platform keyboard popping up, Flutter for Web needs to set the input element's inputmode attribute to none. This matches well with the TextInputType enum that is already used to define the attribute.

Similarly, the rest of the platforms need to respect TextInputType.none when passed in the text input configuration.

Additional notes

This would lay the foundations for custom in-app virtual keyboards: #68988 and #76072.

PR: #83974

Activity

  1. added
    in triagePresently being triaged by the triage team
    a: text inputEntering text in a text field or keyboard related problems
    frameworkflutter/packages/flutter repository. See also f: labels.
    c: proposalA detailed proposal for a change to Flutter
    and removed
    in triagePresently being triaged by the triage team
    on May 31, 2021
  2. github-actions commented on Jul 30, 2021

    @github-actions

    This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

  3. locked as resolved and limited conversation to collaborators on Jul 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    a: text inputEntering text in a text field or keyboard related problemsc: proposalA detailed proposal for a change to Flutterframeworkflutter/packages/flutter repository. See also f: labels.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions