Reland fix inputDecorator hint color on M3 (#150278)
## Description This PR is a partial reland of https://github.com/flutter/flutter/pull/148944 which was reverted in https://github.com/flutter/flutter/pull/149448. It makes the `InputDecoration.hintText` colors compliant with the M3 spec. The initial PR also changed the font style, I will land the font change in another PR to better track the golden changes. ## Related Issue Related to the color part of https://github.com/flutter/flutter/issues/148787. ## Tests Updates several tests.
This commit is contained in:
@@ -34,9 +34,9 @@ class _${blockName}DefaultsM3 extends InputDecorationTheme {
|
||||
@override
|
||||
TextStyle? get hintStyle => MaterialStateTextStyle.resolveWith((Set<MaterialState> states) {
|
||||
if (states.contains(MaterialState.disabled)) {
|
||||
return TextStyle(color: Theme.of(context).disabledColor);
|
||||
return TextStyle(color: ${componentColor('md.comp.filled-text-field.disabled.supporting-text')});
|
||||
}
|
||||
return TextStyle(color: Theme.of(context).hintColor);
|
||||
return TextStyle(color: ${componentColor('md.comp.filled-text-field.supporting-text')});
|
||||
});
|
||||
|
||||
@override
|
||||
|
||||
Reference in New Issue
Block a user