Fix : Color of logout button fades in dark mode
Description
This PR resolve the issue with the color of logout button in profile screen. Fixes https://github.com/AOSSIE-Org/Resonate/issues/315
Changes: Directly updating the icon color with themeController.primaryColor.value was not working when i was switching to different color because in profile screen only body is wrapped with Obx and logout button lies outside the body .For reflecting the changes immediately on logout button ,we have to wrap scaffold with Obx.
Fixes #315
Type of change
- [x] Bug fix (non-breaking change which fixes an issue)
How Has This Been Tested?
Tested Manually on physical device
https://github.com/AOSSIE-Org/Resonate/assets/136071018/add4d134-97d8-40a1-ba46-1a5cd6fc08f4
Checklist:
- [x] My code follows the style guidelines of this project
- [x] I have performed a self-review of my own code
- [x] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings
- [ ] I have added tests that prove my fix is effective or that my feature works
- [ ] New and existing unit tests pass locally with my changes
- [ ] Any dependent changes have been merged and published in downstream modules
- [x] I have checked my code and corrected any misspellings
Maintainer Checklist
- [ ] closes #xxxx (Replace xxxx with the GitHub issue number)
- [ ] Tag the PR with the appropriate labels
@chandansgowda please check this
I think there's no need to use stream builder, the primary color is already observable variable once the user choose new color the primary color will change thus the whole app screens will rebuilt due to the Obx on the main file
Color change is not reflecting on logout button instantly.Other widgets on the screen lies inside the body and body is wrapped with Obx,but logout button lies outside the body. That's why I used streambuilder for logout icon.It could also be resolved by wrapping scaffold by obx,I will do this instead.
I think there's no need to use stream builder, the primary color is already observable variable once the user choose new color the primary color will change thus the whole app screens will rebuilt due to the Obx on the main file
Color change is not reflecting on logout button instantly.Other widgets on the screen lies inside the body and body is wrapped with Obx,but logout button lies outside the body. That's why I used streambuilder for logout icon.It could also be resolved by wrapping scaffold by obx,I will do this instead.
The whole app is inside Obx widget once the user update the app color the whole app will be rebuilt
Hey @AyaNady17 this seems good enough and is good to go please do merge it
@amanraval76593 Thank you for the contribution but this has already been taken care of in https://github.com/AOSSIE-Org/Resonate/pull/297