Closed alexw92 closed 4 months ago
@alexw92 Would you also mind providing a screen record of what you're seeing? Would be much more helpful for me trying to reproduce! Thanks!
@BirjuVachhani Sure, I just recorded a short video with my phone which shows the issue. It is attached above
I am just passing by and giving feedback. 😀
On android 13 in Edge browser v116 it works fine. 👌
@alexw92 check latest release for cleaner theme switch 😀
thanks @giga10 for your feedback. I updated the dependency.
So for me it looks like that the status bar is onTheme change quickly changed to green before that change is taken back immediately. Also shouldnt Chrome itself go dark in darkmode? When I open github on my phone the chrome bar is dark for instance. I have do clue what I am doing wrong here.
I checked on chrome and safari on iOS 16 and it seems to be working just fine both in light mode and dark mode!
https://github.com/BirjuVachhani/adaptive_theme/assets/20423471/343f9521-824b-4062-ac5e-eea18ffb8562
https://github.com/BirjuVachhani/adaptive_theme/assets/20423471/c0c5ee01-8854-4c39-91cf-ae7941f72aee
AFAIK..this is not something that can be controlled by Flutter. I'll try to test on an Android device!
thanks @BirjuVachhani very interesting. It seems even in the second video the status bar gets colored too which I never got working on the devices I have at hand. On all 3 I tested it it on it was like i posted above unfortunately.
@alexw92 Is this still an issue for you with latest Flutter verison?
I couldnt reproduce it ever since :D It seems to work fine now. I am not completely sure what the reason was in the first place since this was some time ago :D But it works for me too now!
Describe the bug As discussed in other issues we can prevent a flashing bevior on Theme changes and set initial values when passing it directly into the AdaptiveThemeWidget when passing an savedThemeMode before runApp. However, I am currently experiencing a flash in the browser status bar and browser bar when switchting from light to dark mode and vice versa. There is no flash when I build for Android There is no flash when I build for Web and access with DesktopBrowser (tested with Chrome and Firefox)
THERE IS A FLASH When building for web and accessing through a Browser on a mobile device! (Tested with three phones, two of them recent Android phones and one recent Iphone) It is very hard to reproduce and to demonstrate because of this but for demonstration purpose I post my sample site where it is deployed. You need to open this using your mobile phones browser Test Site. Just hit the theme change button and should see the incorrect bevior.
https://github.com/BirjuVachhani/adaptive_theme/assets/9419583/6133f083-e567-48c0-8999-1e203d706a85
To Reproduce Steps to reproduce the behavior:
Expected behavior No flash and same expeierence as on a desktop browser
Smartphone (please complete the following information): 1 Recent Iphone using browser (no data because not my device) 1 Android Phone from 2021 using browser (no data because not my device) 1 Android Phone Huawei P30 Pro using browser (my phone)
Additional context I am using adaptive_theme: ^3.3.0
This is the code of used main.dart file