Skip to content

Allow SearchDelegate to alter TextField properties: autocorrect and enableSuggestions #98241

Closed

Description

@BramDriesen

Use case

I have a screen with a custom search delegate. My search goes through names of local soccer teams (some with funky names). However during testing I noticed that the autocorrect sometimes would kick in and replace an exact match with a name with a real word. This was to me quite frustrating so I looked into the customisation options for the SearchDelegate class. I noticed a few of the TextField options could be set through the constructor, but none of the autocorrect related options.

Proposal

Allow the following:

  • autocorrect
  • enableSuggestions

To override via the constructor similar to how you can override the searchFieldLabel text.

Activity

  1. changed the title [-]Allow SearchDelegate to alter TextField properties: `autocorrect`, `autofillHints` and `enableSuggestions`[/-] [+]Allow SearchDelegate to alter TextField properties: `autocorrect` and `enableSuggestions`[/+] on Feb 11, 2022
  2. added
    in triagePresently being triaged by the triage team
    p: material_uimaterial_ui package in flutter/packages
    frameworkflutter/packages/flutter repository. See also f: labels.
    c: proposalA detailed proposal for a change to Flutter
    c: new featureNothing broken; request for a new capability
    and removed
    in triagePresently being triaged by the triage team
    on Feb 11, 2022
  3. fvisticot commented on Jun 5, 2022

    @fvisticot

    I have the same issue with the autocomplete feature...The text in the search bar becomes a "black rectangle"(cf. screenshot) and User experience is degraded
    Any workaround
    IMG_F1AD7787FB4A-1
    ?

  4. fvisticot commented on Jun 5, 2022

    @fvisticot

    I have the same issue with the autocomplete feature...The text in the search bar becomes a "black rectangle"(cf. screenshot) and User experience is degraded Any workaround IMG_F1AD7787FB4A-1 ?

    I found the issue with Theme customization

    textSelectionTheme: TextSelectionThemeData(
                cursorColor: Colors.black,
                selectionColor: Palette.ticatagBlueColor),
    
  5. AguinaldoAranda commented on Dec 18, 2023

    @AguinaldoAranda

    Due to this issue: #138464

    I needed to set autocorrect = false and I can't..., I'll need to use another approach to search records...

  6. added and removed
    team-designOwned by Design Languages team
    triaged-designTriaged by Design Languages team
    on Oct 24, 2024
  7. justinmc commented on Oct 24, 2024

    @justinmc
    Contributor

    Looks like this has been fixed in #154932.

    If there's any part of this that should still stay around, let me know and I'll reopen!

  8. github-actions commented on Nov 7, 2024

    @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.

  9. locked as resolved and limited conversation to collaborators on Nov 7, 2024
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

    c: new featureNothing broken; request for a new capabilityc: proposalA detailed proposal for a change to Flutterframeworkflutter/packages/flutter repository. See also f: labels.p: material_uimaterial_ui package in flutter/packagesteam-text-inputOwned by Text Input team

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions