flutter_blurhash icon indicating copy to clipboard operation
flutter_blurhash copied to clipboard

Bad state: Cannot clone a disposed image

Open Kevin301099 opened this issue 4 years ago • 6 comments

The clone() method of a previously-disposed Image was called. Once an Image object has been disposed, it can no longer be used to create handles, as the underlying data may have been released.

Navigate new screen and back to blur hash screen, I am getting this error

Kevin301099 avatar Feb 24 '22 14:02 Kevin301099

The clone() method of a previously-disposed Image was called. Once an Image object has been disposed, it can no longer be used to create handles, as the underlying data may have been released.

Navigate new screen and back to blur hash screen, I am getting this error

Have you found any workaround?

YDA93 avatar Apr 05 '22 18:04 YDA93

After installing and applying the flutter_blurhash package, I started encountering this error frequently in my console.

I believe this issue might be related to the usage of Slivers or widget rebuildings.

Any news about this?

felipecastrosales avatar Jul 10 '23 20:07 felipecastrosales

Any expectation about this? @Solido

felipecastrosales avatar Aug 31 '23 00:08 felipecastrosales

Hey folks, I created a minimal reproducible example for this, check the video below with an easy way to reproduce this:

https://github.com/felipecastrosales/bad_state_poc/assets/59374587/dc2f5316-8d3d-4aa4-8930-2b484ff00f5d

For more details and to see the code example above:

  • https://github.com/felipecastrosales/bad_state_poc

felipecastrosales avatar Oct 19 '23 00:10 felipecastrosales

Use BlurHashImage instead of. It worked for me

Before: BlurHash(hash: userProfile.mainPhotoBlurhash)

After: Image( image: BlurHashImage(userProfile.mainPhotoBlurhash), fit: BoxFit.cover, )

kienvtqhi avatar Jan 10 '24 09:01 kienvtqhi

@kienvtqhi can you add evidence in video here?

Use BlurHashImage instead of. It worked for me

Before: BlurHash(hash: userProfile.mainPhotoBlurhash)

After: Image( image: BlurHashImage(userProfile.mainPhotoBlurhash), fit: BoxFit.cover, )

felipecastrosales avatar Jan 15 '24 14:01 felipecastrosales