palette_from_wallpaper 0.1.5 copy "palette_from_wallpaper: ^0.1.5" to clipboard
palette_from_wallpaper: ^0.1.5 copied to clipboard

PlatformAndroid

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

4
likes
140
points
15
downloads

Publisher

unverified uploader

Weekly Downloads

An plugin for fetching the wallpaper palette on android

Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD-3-Clause (license)

Dependencies

flutter

More

Packages that depend on palette_from_wallpaper