palette_from_wallpaper 0.1.5
palette_from_wallpaper: ^0.1.5 copied to clipboard
An plugin for fetching the wallpaper palette on android
Palette From Wallpaper #
An Flutter plugin for fetching an palette from the device wallpaper on Android using the native android.app.WallpaperManager.getWallpaperColors and android.app.WallpaperManager.OnColorsChangedListener apis.
It is exposed in the PaletteFromWallpaper.getPalette method, and has an
Stream counterpart for the next PlatformPalettes in the
PaletteFromWallpaper.paletteUpdates field.
The functionality is also exposed in a more Fluttery api via the
runPlatformThemedApp function, which when called instead of runApp, inserts
an InheritedPalette on the root of the tree, and subscribes to the
paletteUpdates stream, always propagating the new palettes to the tree via
BuildContext.dependOnInheritedWidgetOfExactType, so that the app always use
the most up to date colors from the user wallpaper.
Example #
Checkout the Example app