Skip to content

Conversation

@justinmc
Copy link
Contributor

@justinmc justinmc commented Oct 8, 2020

Description

In dark mode, the search bar was white with white text. Now it looks like this:

Screen Shot 2020-10-08 at 11 40 56 AM

Screen Shot 2020-10-08 at 11 41 58 AM

Related Issues

Closes #66781

Tests

In both light and dark mode, verify the color of the app bar and text are not the same.

@justinmc justinmc requested a review from darrenaustin October 8, 2020 21:04
@justinmc justinmc self-assigned this Oct 8, 2020
@flutter-dashboard flutter-dashboard bot added f: material design flutter/packages/flutter/material repository. framework flutter/packages/flutter repository. See also f: labels. labels Oct 8, 2020
@google-cla google-cla bot added the cla: yes label Oct 8, 2020
@justinmc
Copy link
Contributor Author

justinmc commented Oct 8, 2020

@darrenaustin Let me know if this isn't how the search bar is supposed to be for dark mode.

Copy link
Contributor

@darrenaustin darrenaustin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

assert(theme != null);
return theme.copyWith(
primaryColor: Colors.white,
primaryColor: theme.brightness == Brightness.dark
Copy link
Contributor

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.

Copy link
Contributor Author

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.

@fluttergithubbot fluttergithubbot merged commit c2bb928 into flutter:master Oct 26, 2020
gildaswise added a commit to gildaswise/flutter that referenced this pull request Oct 26, 2020
@justinmc justinmc deleted the search-dark-colors branch October 26, 2020 16:20
@justinmc justinmc added the a: text input Entering text in a text field or keyboard related problems label Feb 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

a: text input Entering text in a text field or keyboard related problems f: material design flutter/packages/flutter/material repository. framework flutter/packages/flutter repository. See also f: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Material's search bar doesn't show text in dark mode

3 participants