-
Notifications
You must be signed in to change notification settings - Fork 28.7k
Search bar dark mode contrast #67679
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
Conversation
@darrenaustin Let me know if this isn't how the search bar is supposed to be for dark mode. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
@@ -199,7 +199,9 @@ abstract class SearchDelegate<T> { | |||
final ThemeData theme = Theme.of(context)!; | |||
assert(theme != null); | |||
return theme.copyWith( | |||
primaryColor: Colors.white, | |||
primaryColor: theme.brightness == Brightness.dark |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This use of primaryColor
in dark themes is something that @HansMuller is trying to sort out at the moment, so this may need to change in the future. For now though this is a reasonable fix for this case. At some point this should be migrated to colorScheme colors.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got it, thanks for the heads up. Hans, let me know if I should open an issue for this or comment anywhere so it's not missed.
Description
In dark mode, the search bar was white with white text. Now it looks like this:
Related Issues
Closes #66781
Tests
In both light and dark mode, verify the color of the app bar and text are not the same.