folksable / blurhash_ffi

a port of blurhash to flutter written in c via dart:ffi
https://pub.dev/packages/blurhash_ffi
BSD 3-Clause "New" or "Revised" License
38 stars 6 forks source link

Error when encoding in compute #17

Closed tmasunda closed 3 months ago

tmasunda commented 3 months ago

Good day

I am getting the following error when I call the following in a compute method: hash = await BlurhashFFI.encode(imageProvider);

Error: BlurException: #0 BlurhashFFI.encode (package:blurhash_ffi/blurhash.dart:88:7)

What could be the cause? Please assist.

dhikshithrm commented 3 months ago

do not use it in compute, it already uses a new isolate to not block the main UI isolate, i think that might be the reason.