dynamic_system_colors
1.9.0, released 8 months ago by hasali.dev
Create Material color schemes based on the platform's dynamic color implementation.
What it does
Provides a widget builder and plugin to fetch device dynamic colors on supported platforms such as Android, Windows, macOS, and Linux. It also supports color and color scheme harmonization to seamlessly blend custom colors with user-generated dynamic colors.
AI-written summary of version 1.9.0, based on the package's README and metadata. Report an inaccuracy
Use it when
- You want your Flutter application to support Material You dynamic colors on Android S+.
- You want to match your app's color theme with desktop OS accent colors on Windows, macOS, or Linux.
- You need to harmonize custom app colors with the user's dynamic system color scheme.
Skip it when
- Your app requires a strict, immutable brand color scheme that must never change based on user wallpapers or OS settings.
- You are targeting platforms that do not support dynamic system colors and you do not need OS accent color integration.
Strengths
- Supports cross-platform dynamic color extraction (Android, Windows, macOS, Linux).
- Includes built-in color harmonization utilities to keep custom colors visually cohesive.
- Provides convenient testing utilities and mock helpers for widget tests.
Weaknesses
- Platform support varies significantly depending on what the underlying operating system provides.
- Older Android versions or non-supporting desktop environments will fall back to default color schemes.
Setup
- Kind
- Plugin (native code)
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 2
No complex native setup steps are documented beyond adding the package dependency and using the DynamicColorBuilder widget.
DynamicColorBuilder(
builder: (ColorScheme? lightDynamic, ColorScheme? darkDynamic) {
return MaterialApp(
theme: ThemeData(colorScheme: lightDynamic),
darkTheme: ThemeData(colorScheme: darkDynamic),
);
},
)Alternatives
Packages that do the same job and could replace dynamic_system_colors.
- dynamic_color
Create Material color schemes based on a platform's implementation of dynamic color.
83Compare - flex_color_scheme
Builds matched light and dark ThemeData for Flutter with Material design themes and seed colors.
89Compare - flutter_color
Flutter plugin for working with color schemes like hex, hsl, xyz, and cielab.
82Compare - color_blindness
Simulate color blindness across Material 3 color schemes or individual colors in Flutter.
69Compare
Works with
Packages commonly used together with dynamic_system_colors: ones it builds on, ones built on it, and its own family.