-
-
Notifications
You must be signed in to change notification settings - Fork 303
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
fix: Question panel dark mode color #1249
fix: Question panel dark mode color #1249
Conversation
Actually @GowthamGoush, what does it look like in darkmode |
@@ -464,7 +464,7 @@ class _SummaryCardState extends State<SummaryCard> { | |||
}, | |||
child: SmoothCard( | |||
margin: EdgeInsets.zero, | |||
color: const Color(0xfff5f6fa), | |||
color: Theme.of(context).primaryColor, |
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.
I think we rather use Theme.of(context).colorScheme.primary
in the rest of the app, could you double-check that?
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.
Sure, let me fix that
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.
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.
@GowthamGoush I have no opinion regarding colors, only about code: I don't like the possible confusion. If I have a look at the current code I only see colorScheme.primary
and never Theme.of(context).primaryColor
. So let's definitely use colorScheme.primary
(and use its value if necessary).
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.
Yes, I definitely agree with whatever you mentioned regarding the standards that we follow. I will fix that soon. Also, thanks for the kind suggestion and feedback.
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.
@M123-dev Then please decide a correct primary color and a correct secondary color. That's what they're here for.
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.
Currently, I have hardcoded these colors based on the brightness of the app but I would like to receive feedback from you regarding this and change it accordingly if needed.
I have attached the screenshots of the results for this:
Theme.of(context).colorScheme.brightness == Brightness.dark ? const Color(0xff212121) : const Color(0xfff5f6fa)
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.
@GowthamGoush I think the color looks much better this way, we have several hardcoded values for colors in the app, but it would still probably be better to make them somehow centralized
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.
Looking at #1274, it looks like the color should be good by just removing the hardcoded value
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.
Oops.. let me add a screenshot of that. |
Fixed in #1323, still thanks for your effort @GowthamGoush |
What
Impacted files
summary_card.dart
Screenshot
Before
After
Fixes bug
Part of