encode static method
Future<String>
encode(
- ImageProvider<
Object> imageProvider, { - int componentX = 4,
- int componentY = 3,
Implementation
static Future<String> encode(
ImageProvider imageProvider, {
int componentX = 4,
int componentY = 3,
}) async {
try {
final BlurHashImageInfo info =
await _instance._getImageInfoFromImageProvider(imageProvider);
return _instance._encodeBlurHash(info, componentX, componentY);
} catch (e) {
throw BlurhashFFIException(
'Could not encode Image', StackTrace.current, e);
}
}