Skip to content
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

Incorrect styling when using a theme switching toggle #20

Closed
MacRokunii opened this issue May 29, 2019 · 4 comments
Closed

Incorrect styling when using a theme switching toggle #20

MacRokunii opened this issue May 29, 2019 · 4 comments
Labels
bug Something isn't working

Comments

@MacRokunii
Copy link

I'm writing an app for my workplace that has a light theme/dark theme toggle switch in a scaffold drawer. I've wrapped most of the text in the app with this widget for string length differences when localizing to other languages. Its been very helpful, but I'm finding that when i use the theme toggle the text colors aren't changing correctly. When loading a page in the app, the text is correctly contrasting against the background (black text on white BG and white text on grey BG) but once the theme toggle is activated the text then matches the background (black text on grey BG and white text on white BG). For reference, I've tried using this widget with two different theme toggling examples I've found online as a way to check if my implementation was causing the issue but its consistent with both of them. The two examples I used can be found at the following github repos

https://github.com/jorgecoca/theme_switcher/tree/theme-switcher-tutorial-1
https://github.com/iampawan/Flutter-Dynamic-Theming

if i need to provide anymore information, please let me know.

@simc
Copy link
Owner

simc commented May 30, 2019

Thanks for reporting this issue.

The easiest way to check if it is a problem with this library is to replace the AutoSizeText with a Text if you still have the same problem it would help if you could provide a small sample.

Which version of AutoSizeText are you using?

@simc simc added the needs info Additional info is needed label May 30, 2019
@no-response no-response bot removed the needs info Additional info is needed label May 30, 2019
@MacRokunii
Copy link
Author

I am using version 1.1.2 and i have confirmed that using a Text in place of an AutoSizeText works as expected. here is a code sample from on of the theme toggling methods i provided in the first note that replaces a Text with an AutoSizeText that reproduces my issue

main.txt

@simc
Copy link
Owner

simc commented May 30, 2019

The problem is fixed in version 2.0.0-dev+2. Could you please test if it works for you?

@simc simc added the bug Something isn't working label May 30, 2019
@MacRokunii
Copy link
Author

Looks like it's working on my end. I appreciate the quick turn around, Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants