Skip to content

A Flutter widget that provides reactive color schemes based on given source/seed color.

License

Notifications You must be signed in to change notification settings

sonicwaste/dyna

Repository files navigation

Dyna

Dyna wraps your app to provide ColorSchemes based on user wallpaper (currenly only on Android 12+) or given source color. You can plug these schemes right into your app and update your app's theme in real-time.

demo.mp4
Dyna(
  builder: (context, ColorScheme light, ColorScheme dark) {
    return MaterialApp(
      title: 'Dyna Demo',
      theme: AppTheme.make(light),
      darkTheme: AppTheme.make(dark),
    );
  },
);
ColorPicker(
  pickerColor: context.dyna.color ?? Colors.grey,
  onColorChanged: (color) {
    context.dyna.update(color);
  },
),

Priority

Dyna will use context.dyna.color to generate the ColorSchemes. If this value is null (default), Dyna will try to get a ColorScheme from the underlying platform (e.g. wallpaper based on Android). If the platform is not supported, Dyna will then use the given default color (to the Dyna widget) to generate the ColorSchemes. If none is provided, Dyna will use the package default color (kDynaDefaultColor).

About

A Flutter widget that provides reactive color schemes based on given source/seed color.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published