This is a new and easy approach on Flutter Themes.
Automatically get your OS defined Theme (Dynamic), force your prefered one (Light / Dark) and persist your choice in the device.
Easy peasy, don't you think? ;)
Demo
Getting Started
For help getting started with Flutter, view our online documentation, which offers tutorials, samples, guidance on mobile development, and a full API reference.
Minimum Requirements
Dart SDK: >=2.12.0 <3.0.0
Flutter: >= 1.20.0
Installation and Usage
Once you're familiar with Flutter you may install this package adding easy_dynamic_theme to the dependencies list
of the pubspec.yaml file as follow:
EasyDynamicThemeBtn, which is (kind of) a FlatButton that displays the icon according to the current theme of your app and allows you to switch between them.
EasyDynamicThemeSwitch, which is a Switch widget, based on the current theme's brightness of your context and allows you to switch between light/dark them.
EasyDynamicThemeAutoSwitch, which is a Switch widget, based on the current theme of your app and allows you to prioritize (or not) your OS defined brightness.