-
Notifications
You must be signed in to change notification settings - Fork 26.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
change the color of unfocused text field icon #33183
Comments
@HansMuller already asked on StackOverFlow but i think it should be implemented in Flutter in ThemeData like other widgets |
Any update on this topic ? Still very hard to modify Textfield style... |
Any news on this? |
Its hard coded flutter/packages/flutter/lib/src/material/input_decorator.dart Color _getDefaultIconColor(ThemeData themeData) {
if (!decoration!.enabled && !isFocused)
return themeData.disabledColor;
switch (themeData.brightness) {
case Brightness.dark:
return Colors.white70;
case Brightness.light:
return Colors.black45;
}
} |
I can see two sensible expected behaviors:
Material design doesn't have any clear specification about icon colors in text fields. If it's sensible to use the existing theme then My suggestion would be to replace:
With:
The only problem with reusing the theme as suggested is when your desired colour is different from the hintColor, you will still not be able to specify it. |
Any update on this?? |
This issue is missing a priority label. Please set a priority label when adding the |
This request has been resolved. See the last two examples on https://api.flutter.dev/flutter/material/InputDecoration-class.html |
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 |
Use case
Theming TextField unfouced icon color through themeData.
Proposal
i'm trying to use ThemeData to change the app colors at any moment, also it's easier to manage app when it's colors are contained in one single file like CSS does
what flutter can do? make the icon take the color of unselectedWidgetColor of themeData , i think it's the corrected color instead of hard Coded grey color
for more info about this request, you can check this stackoverflow as i though it's already implemented but it wasn't , they told me some workarounds , but i think it's easy to be implemented isn't it ?
The text was updated successfully, but these errors were encountered: