-
Notifications
You must be signed in to change notification settings - Fork 180
Exception when calling setState on loadedCallback in Hero widget #84
Comments
Hi, give me a code snippet to reproduce this issue. |
Here is a minimal example. Press the image to go to the next page, to trigger the Exception. The exception only happens when the image is wrapped in a
|
Can you use |
Yes. This seem to work. Thank you for your efforts. |
I found a case where this crashes still. If i add a Se example ( notice
|
Hmmm, i have no crashes with this example but only one |
If i run the app once, and then perform a hot restart, it crashes with the following ( trying to set state when it has been disposed ).
Adding |
Just making a different image provider hashes. |
It feels a bit wrong to set |
Umm, maybe i can add @override
int get hashCode => ui.hashValues(uid, url, scale, header, useDiskCache,
retryLimit, retryDuration, retryDurationFactor, timeoutDuration);
|
How would the If i add |
Next version maybe? Maybe |
What i optimally would like to happen is that As you said, you were not able to show the |
Similar to the issue above, I have a AdvancedNetworkImage which does not use loadedCallback but instead uses an icon for loadingWidget and I get the same setState assertion only in Hero widgets (works fine with MaterialScaffold but has issues with CupertinoScaffold.
|
I have the same problem as @erf and the |
Adding this works. So basically we don't get loaded callbacks when images are loaded from the memory cache
|
I have a
StatefulWidget
with aTransitionToImage(image: AdvancedNetworkImage...
.I get an exception when i call
setState
insideTransitionToImage.loadedCallback
.Log:
The text was updated successfully, but these errors were encountered: