getCoverImage method

Future<Uint8List> getCoverImage(
  1. LocalImageProvider localImageProvider,
  2. int pixelHeight,
  3. int pixelWidth, {
  4. int? compression,
})

Returns a jpeg of the cover image for the album that can be loaded into a MemoryImage.

The resulting image will maintain its aspect ratio and fit within a pixelHeightxpixelWidth area.

Implementation

Future<Uint8List> getCoverImage(
    LocalImageProvider localImageProvider, int pixelHeight, int pixelWidth,
    {int? compression}) async {
  return localImageProvider.imageBytes(coverImg!.id!, pixelHeight, pixelWidth,
      compression: compression);
}