When you first build the app on any device or install it for first time, it initializes the theme to system's default theme. If the system theme is light mode there is no visible error but if it is dark mode the toggling button will skip the press for one click as it will set System (presumed to be Light mode by the code given in home_page.dart )mode to Dark mode first.
Solution proposed
I have taken initial theme as the light mode and toggled between the dark and light modes which were defined in the program from before.
Additional Information
Moreover it is saving the theme currently upon closing the app if it doesn't we can store it using shared pref.
Problem / Issue No.
Describe Problem / Root Cause
Solution proposed
Additional Information
Screenshots
https://github.com/andoriyaprashant/OpSo/assets/66560136/9b64c13a-65e8-48f5-a5ad-6f2e2e665292
https://github.com/andoriyaprashant/OpSo/assets/66560136/6684c4b0-6265-462d-be43-9246665b3b23