v1.2.0blurhash
एक छोटे से प्रतिनिधित्व के रूप में एक चित्र के लिए स्थान भरने वाला।
79लाइक 4.9 हज़ार30-दिन डाउनलोड150Pub अंक
AndroidiOSWeb
एक छवि के लिए स्थान धरार का संक्षिप्त प्रतिनिधित्व।
{"sdk":"flutter"}{"sdk":"flutter"}^1.0.0^2.0.2^1.2.0^4.0.0{"sdk":"flutter"}^5.0.0यह अंग्रेज़ी मूल स्नैपशॉट है। नवीनतम सामग्री GitHub पर देखें।
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);
}
}