Skip to content

M3 TextFields with IconButtons don't adopt error state #119924

@esouthren

Description

@esouthren

In M3, when using a TextField in an error state, the suffix icon does not take error state colors, as expected.

The spec dictates that suffix icons should support error states (though not the prefix icon):
image

Currently, the InputDecorator uses iconTheme for the icons. In M3, if an IconButton widget is used as a suffix icon (which is more likely), the color resolves for iconTheme, but not iconButtonTheme. So, if an app-wide IconButtonTheme override is applied, the error state does not resolve as expected:
Screenshot 2023-02-03 11 43 41 AM

Dartpad available at https://dartpad.dev/?id=4be14c02467d4ab583fbfa68b9016d00&channel=master.

The solution will involve supporting IconButtonTheme values in the input decorator.

Metadata

Metadata

Assignees

Labels

f: material designflutter/packages/flutter/material repository.

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions