v1.2.0blurhash
A very compact representation of a placeholder for an image.
79Likes 2.3K30-day downloads150Pub points
AndroidiOSWeb
Compact representation of a placeholder for an image. (Flutter)
English project snapshot. Visit GitHub for the latest content.
Compact representation of a placeholder for an image.
| Android | iOS | Web |
|---|---|---|
| ✔️ | ✔️ | ✔️ |
To use this plugin, add blurhash as a dependency in your pubspec.yaml file.
void blurHashEncode() async {
ByteData bytes = await rootBundle.load("image.jpg");
Uint8List pixels = bytes.buffer.asUint8List();
var blurHash = await BlurHash.encode(pixels, 4, 3);
}
void blurHashDecode() async {
Uint8List? imageDataBytes;
try {
imageDataBytes = await BlurHash.decode(blurhash, 20, 12);
} on PlatformException catch (e) {
throw Exception(e.message);
}
}
Dependency list 8 items
{"sdk":"flutter"}{"sdk":"flutter"}^1.0.0^2.0.2^1.2.0^4.0.0{"sdk":"flutter"}^5.0.0Start with your use case, compare repository activity, and check the original project before adopting it.
“A repository is the most basic element of GitHub.”
GitHub Docs — About repositories ↗