fluttercommunity / flutter_blurhash

Compact representation of a placeholder for an image. Encode a blurry image under 30 caracters for instant display like used by Medium. Maintainer: @Solido
https://pub.dev/packages/flutter_blurhash
MIT License
528 stars 66 forks source link

Universal BlurHash widget #51

Open zs-dima opened 2 years ago

zs-dima commented 2 years ago

Remote resource to download image is very specific way to use BlurHash widget. Images could be loaded in many different ways using different protocols. Could be nice to make BlurHash widget universal.

dhikshithrm commented 1 year ago

Yes, to solve this i had build a package blurhash_ffi that takes in any ImageProvider subclass, which includes AssetImage, NetworkImage, MemoryImage, etc. it has both encoding and decoding which runs on a separate isolate with native C bindings found in original blurha.sh implementation.

It has Same API as flutter_blurhash and blurhash_dart, which is nice because you don't have to change much in your code.

Checkout if you are interested!