How to add Dark mode in Flutter with Provider | Shared Preferences | Adaptive Theming
Vložit
- čas přidán 9. 07. 2024
- By the end of this tutorial, you will be able to seamlessly integrate light and dark themes into your own apps.
All the assets and code are available in the link below.
Source Code: github.com/Flutter-ui-dev/Flu...
00:00 - Intro
00:25 - Coding UI
05:06 - Creating Theme Provider
06:45 - Integrating Provider With UI
10:17 - Persisting Theme using Shared Prefs
#flutter #flutterdev #theming #darkmode
You have covered many wonderful things in a concise and informative manner
Super bro
This was perfect.
really helpful also clean code using provider arch.
the best ever!
Thanks 😊
very help full
Glad it helped
Thank you for the tutorial,
I want to know how can we get the theme from prefs before it builds the UI to the user.
Instead of building the UI first, then change the theme.
I guess setting the themeMode in material app according to prefs will do the job
How do you customise with .copyWith()?
The copyWith method can be use with almost any material properties,
To customise just call it and pass the parameters that you want to customise, it is really that simple
i followed step by step idk why it's not working, there aren't even any errors that it's showing 😭
Can you share your code
i get an error in themeMode: provider.themeMode
What error did you exactly got?