blurhash
1.2.0, released 2 years ago by raincal.com
A very compact representation of a placeholder for an image.
WASM-ready
What it does
Provides encoding and decoding capabilities for BlurHash strings. Allows generating a compact placeholder hash from raw image bytes and decoding a hash back into image bytes.
AI-written summary of version 1.2.0, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need compact string placeholders for images while they load
- You want to encode images to BlurHash on supported platforms
Skip it when
- You do not need image placeholders
- You need high-level cached image widgets instead of low-level decoding
Strengths
- Supports Android, iOS, and Web
- Compact representation for placeholders
Weaknesses
- Limited documentation beyond basic README examples
- Platform-specific exceptions can be thrown during decoding
Setup
- Kind
- Plugin (native code)
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 4
Add blurhash as a dependency in pubspec.yaml.
void blurHashDecode() async {
Uint8List? imageDataBytes;
try {
imageDataBytes = await BlurHash.decode(blurhash, 20, 12);
} on PlatformException catch (e) {
throw Exception(e.message);
}
}Alternatives
Packages that do the same job and could replace blurhash.
- cached_network_image
Provides complete image loading and caching with built-in placeholder support.
91Compare - octo_image
Offers advanced image placeholder and error widget builders.
94Compare
Works with
Packages commonly used together with blurhash: ones it builds on, ones built on it, and its own family.
- webblurhash depends on itLightweight bindings for browser APIs via JS interop
- plugin_platform_interfaceblurhash depends on itReusable base class for platform interfaces of Flutter federated plugins.
- imageblurhash depends on itPure Dart library to load, manipulate, encode, and decode various image formats.
- blurhash_dartblurhash depends on itA pure Dart implementation of the BlurHash algorithm for encoding and decoding images.