Package selection guidance compiled from public package information, community data, and project usage.
EasyDynamicTheme is a Flutter package that simplifies theme management by automatically detecting the system's preferred theme (light or dark mode), allowing developers to enforce a specific theme, and persisting user preferences across app restarts. It supports all major platforms including Android, iOS, Web, macOS, Windows, and Linux. The package integrates seamlessly with Flutter’s theme system, reducing boilerplate code and enhancing user experience through adaptive design. It is ideal for apps aiming to provide a consistent and personalized UI based on user settings and device behavior.
Use cases
Adaptive UI based on system theme
Persisting user theme preference
Enforcing light or dark mode
Cross-platform theme consistency
Simplifying theme logic in large apps
Supporting accessibility features
Key features
Automatic OS theme detection
Persistent theme storage
Easy theme switching
Support for all Flutter platforms
Minimal setup required
Built-in theme provider
Suitable for
Developers seeking simple theme management
Apps requiring dark/light mode support
Projects targeting multiple platforms
Teams wanting reduced boilerplate
Apps focused on user experience
Accessibility-conscious applications
Considerations
Requires manual handling of theme rebuilds
Limited customization beyond basic themes
Does not support dynamic theme updates at runtime
Best suited for apps with static theme choices
May need additional logic for complex theme scenarios
Depends on shared_preferences for persistence
Original README
Original README snapshot from the linked source repository. Visit the repository for the latest content.
Easy Dynamic Theme
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.