blurhash 1.2.0 copy "blurhash: ^1.2.0" to clipboard
blurhash: ^1.2.0 copied to clipboard

A very compact representation of a placeholder for an image.

blurhash #

pub package

Compact representation of a placeholder for an image.

Platform Support #

Android iOS Web
✔️ ✔️ ✔️

Usage #

To use this plugin, add blurhash as a dependency in your pubspec.yaml file.

Example #

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);
  }
}
copied to clipboard
76
likes
150
points
3.67k
downloads

Publisher

verified publisherraincal.com

Weekly Downloads

2024.09.21 - 2025.04.05

A very compact representation of a placeholder for an image.

Repository (GitHub)

Documentation

API reference

License

MIT (license)

Dependencies

blurhash_dart, flutter, flutter_web_plugins, image, plugin_platform_interface, web

More

Packages that depend on blurhash