Skip to content

Add Theme-level option to align error text with the text field border (remove default indent/padding) #175834

Closed
flutter/packages
#12769

Description

@YawarOsman

Use case

Currently, when using TextField / TextFormField, the error text (errorText) is rendered with an indent that matches the input/hint text padding. This behavior makes the error text look visually offset from the left border of the field.

At the moment, the only way to fix this is by overriding decoration properties (error widget, custom padding, etc.) on each individual field. This is tedious and redundant in larger apps. If the padding needs to be adjusted later, developers must revisit every field manually.

Proposal

Introduce a theme-level property (e.g., in InputDecorationTheme) that controls the horizontal alignment/padding of error/helper text independently from the input/hint text.

Example API idea:

InputDecorationTheme(
  errorPadding: EdgeInsets.zero, // or Alignment options
  errorAlignment: TextAlign.start,
)

Why it matters:

Developers often want the input/hint text to be padded, but the error text to be flush with the text field border.

This improves visual consistency in UIs.

Reduces redundancy by eliminating per-field overrides.

Activity

  1. tirth-patel-nc commented on Sep 23, 2025

    @tirth-patel-nc
    Member

    @YawarOsman thanks for the report. labelling it as a new proposal.

    Also, InputDecorationTheme already has contentPadding property.

  2. added
    c: proposalA detailed proposal for a change to Flutter
    c: new featureNothing broken; request for a new capability
    frameworkflutter/packages/flutter repository. See also f: labels.
    a: text inputEntering text in a text field or keyboard related problems
    p: material_uimaterial_ui package in flutter/packages
    fyi-designFor the attention of Design Languages team
    and removed
    in triagePresently being triaged by the triage team
    c: proposalA detailed proposal for a change to Flutter
    on Sep 23, 2025
  3. dkwingsmt commented on Sep 24, 2025

    @dkwingsmt
    Contributor

    @YawarOsman Can you give an example of the misalignment, possibly with a repro code and screenshot? Thank you.

  4. added
    waiting for responseThe Flutter team cannot make further progress on this issue until the original reporter responds
    P3Issues that are less important to the Flutter project
    on Sep 24, 2025
  5. 18 remaining items

  6. abikko commented on Oct 31, 2025

    @abikko

    @tirth-patel-nc

    Hi!

    Created PR - but it's not ready yet...

    #177826

  7. abikko commented on Nov 4, 2025

    @abikko

    @tirth-patel-nc Hi, I done with implementing the fix for issue, could someone review my PR?

    After approve I will start writing tests

  8. YawarOsman commented on Jan 2, 2026

    @YawarOsman
    Author

    @YawarOsman Can you give an example of the misalignment, possibly with a repro code and screenshot? Thank you.

    What do you mean by misalignment? it's clear what i mentioned

  9. added
    has partial patchThere is a PR awaiting someone to take it across the finish line
    on Feb 12, 2026
  10. MohanadAbdallah-mv commented on Feb 13, 2026

    @MohanadAbdallah-mv
    Contributor

    Hello , I was working on issue #181755 before it got closed as duplicate but since @abikko is assigned to this issue , hope you find that proposal helpful .
    I will be ready to help as well if that issue have follow-ups

  11. added
    ⏳Bot is counting down the days until it unassigns the issue
    on Jun 18, 2026
  12. flutter-triage-bot commented on Jun 18, 2026

    @flutter-triage-bot

    This issue is assigned to @abikko but has had no recent status updates. Please consider unassigning this issue if it is not going to be addressed in the near future. This allows people to have a clearer picture of what work is actually planned. Thanks!

  13. added
    packageflutter/packages repository. See also p: labels.
    and removed
    frameworkflutter/packages/flutter repository. See also f: labels.
    on Aug 17, 2026
  14. removed
    ⏳Bot is counting down the days until it unassigns the issue
    on Aug 17, 2026
  15. added a commit that references this issue on Sep 30, 2026
    b63b216
  16. github-actions commented on Oct 14, 2026

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

  17. locked as resolved and limited conversation to collaborators on Oct 14, 2026
  18. added a commit that references this issue on Oct 29, 2026
    fb6c86b
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

P3Issues that are less important to the Flutter projecta: text inputEntering text in a text field or keyboard related problemsc: new featureNothing broken; request for a new capabilityc: proposalA detailed proposal for a change to Flutterhas partial patchThere is a PR awaiting someone to take it across the finish linep: material_uimaterial_ui package in flutter/packagespackageflutter/packages repository. See also p: labels.team-text-inputOwned by Text Input teamtriaged-text-inputTriaged by Text Input team

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions