decode method

  1. @override
Future<Uint8List?> decode(
  1. String blurHash,
  2. int width,
  3. int height, {
  4. double punch = 1.0,
  5. bool useCache = true,
})
override

Implementation

@override
Future<Uint8List?> decode(String blurHash, int width, int height,
    {double punch = 1.0, bool useCache = true}) async {
  BlurHash brhash = BlurHash.decode(blurHash, punch: punch);
  img.Image image = brhash.toImage(width, height);
  return Uint8List.fromList(img.encodeJpg(image));
}