getImagePalette static method

Future<Color> getImagePalette(
  1. ImageProvider<Object> imageProvider
)

Implementation

static Future<Color> getImagePalette(ImageProvider imageProvider) async {
  final PaletteGenerator paletteGenerator = await PaletteGenerator.fromImageProvider(imageProvider);
  return paletteGenerator.dominantColor!.color;
}