Closed KumarSunil17 closed 4 years ago
type '(Uint8List, {int cacheHeight, int cacheWidth}) => Future<Codec>' is not a subtype of type '(Uint8List, {bool allowUpscaling, int cacheHeight, int cacheWidth}) => Future<Codec>' of 'decode'
Solution Try replacing
imageProvider.load(key, (Uint8List bytes, {int cacheWidth, int cacheHeight}) async { return await ui.instantiateImageCodec(bytes); }) ..addListener(ImageStreamListener((ImageInfo image, _) { completer.complete(image.image); }));
with
imageProvider.load(key, (Uint8List bytes, {int cacheWidth, int cacheHeight, bool allowUpscaling}) async { return await ui.instantiateImageCodec(bytes); }) ..addListener(ImageStreamListener((ImageInfo image, _) { completer.complete(image.image); }));
Thanks @KumarSunil17! The image cover is fixed in the 1.4.0 release https://pub.dev/packages/scratcher
Error while using image:
Solution Try replacing
with