Resonate icon indicating copy to clipboard operation
Resonate copied to clipboard

Fix : Color of logout button fades in dark mode

Open amanraval76593 opened this issue 1 year ago • 5 comments

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

amanraval76593 avatar Mar 27 '24 20:03 amanraval76593

@chandansgowda please check this

amanraval76593 avatar Mar 27 '24 20:03 amanraval76593

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.

amanraval76593 avatar Mar 29 '24 06:03 amanraval76593

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

AyaNady17 avatar Mar 29 '24 17:03 AyaNady17

Hey @AyaNady17 this seems good enough and is good to go please do merge it

Aarush-Acharya avatar May 09 '24 14:05 Aarush-Acharya

@amanraval76593 Thank you for the contribution but this has already been taken care of in https://github.com/AOSSIE-Org/Resonate/pull/297

Aarush-Acharya avatar May 10 '24 07:05 Aarush-Acharya