Closed mark8044 closed 11 months ago
The package works wonderfully when using NetworkImage provider
final imageProvider = NetworkImage(imageUrl); final String blurHash = await BlurhashFFI.encode(imageProvider);
However, when trying to use a CachedNetworkImageProvider:
CachedNetworkImageProvider
final imageProvider = CachedNetworkImageProvider(imageUrl); final String blurHash = await BlurhashFFI.encode(imageProvider);
Then we get the following error:
[ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: Bad state: Future already completed #0 _AsyncCompleter.complete (dart:async/future_impl.dart:43:31) #1 BlurhashFFI._getImageInfoFromImageProvider.<anonymous closure> (package:blurhash_ffi/blurhash.dart:195:17) <asynchronous suspension>
Despite the error, a blur hash string is still returned....
Hey @mark8044, this is a known issue caused by cached_network_image package, please follow #6 for updates
cached_network_image
@dhikshith12 Ah ok I see, I will follow there, thank you
The package works wonderfully when using NetworkImage provider
However, when trying to use a
CachedNetworkImageProvider
:Then we get the following error:
Despite the error, a blur hash string is still returned....