-
-
Notifications
You must be signed in to change notification settings - Fork 63
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 UI colors #242
base: master
Are you sure you want to change the base?
Fix UI colors #242
Conversation
remove talkerscreen theme in favor of just the Theme add utility function to LogColors to get color based on log data use Theme.of(context) consistently
Codecov ReportAll modified and coverable lines are covered by tests ✅
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## master #242 +/- ##
==========================================
- Coverage 98.80% 98.78% -0.02%
==========================================
Files 28 28
Lines 584 576 -8
==========================================
- Hits 577 569 -8
Misses 7 7 ☔ View full report in Codecov by Sentry. |
Hello @XanderD99 ! For my opinion it's looks very nice. But it's huge breaking change for develeopers who already used talker_flutter to create self logging packages or logs screen customization. And now I'm thinking about how we can support old TalkerScreenTheme with Deprecated annotation and new UI |
I think the best way to have that backwards compability is to keep the TalkerScreenTheme (bring it back in this case) but indeed mark it depricated. That way the TalkerScreenTheme is removed from al the UI itself but is still available to the other developers until it is completely removed after some time. |
It would be batter to change typedef LogColors from Map<TalkerLogType, Color> to Map<String, Color> it's will allow to create custom log types with custom colors |
hey @Frezyx I updated the code and added TalkerTheme back to TalkerScreen. I marked is as deprecated however, but when it is set it uses logColors from the talkerTheme and it wraps the TalkerView with a theme that should set background and card colors accordingly. I haven't fully tested this yet so this should be verified. The failed build is because of the marked deprecated item |
Thanks a lot for contributing!
Hey, I just found some more UI inconsistencies and tried fixing them all at once.
I removed the "TalkerScreenTheme" class and changed that option with the LogColors property. So now by default all colors for text and background and such just use the theme set by the user.
The LogCards still use the color that is found in the LogColors map. The border of the card uses the color as it is provided and the background is the log color with some opacity added to it. The makes it readable on any theme (at least the colors I tested).
I also changed the default state of the expanded logs to false, if you don't want this I can revert that. I changed that so that the main feed can contain more data and you can then only expand those you want to see more details about. To give errors some more info I set the message to the errorType if no message is given. Errors always show some minor information this way.
If users want to set some custom theme in the log screen they can still wrap it in a Theme widget. Perhaps if needed someone can make a "TalkerTheme" widget that can be used to wrap the talkerScreen?