You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I seem to be having a problem, here is the workflow:
1.Thumbnail gets created with "_image":
Thumbnail(
dataResolver: () async {
return _image.readAsBytes();
},
mimeType: "image/" + _image.extension,
widgetSize: double.infinity,
)
_image is changed to another image and setState is called and the thumbnail should be recreated.
I have a breakpoint when debugging on the line "return _image.readAsBytes();" and it is run on step 1, but after setState is called the thumbnail code is rerun, but never the line "return _image.readAsBytes();" and consequently, the image is not updated.
Perhaps i am missing something and there is no issue with the plugin.
Help appreciated.
The text was updated successfully, but these errors were encountered:
this is currently not supported for performance reasons.
One possible workound would be to provide widget with Key and change it after changing the _image variable. This way it should force flutter to recreate the widget state and load new thumbnail.
We have no plans to add support for updating the thumbnail at the moment but we would be happy to merge well written PR.
I can understand your concern, you're facing thumbnail re-rendering issue. So, this is my code & it is working as expected. I solved it by providing a "Key" with value of it's path. If in-case it won't work for you try - key: UniqueKey(), at line no. 211.
Hello!
Thanks for this plugin.
I seem to be having a problem, here is the workflow:
1.Thumbnail gets created with "_image":
Thumbnail(
dataResolver: () async {
return _image.readAsBytes();
},
mimeType: "image/" + _image.extension,
widgetSize: double.infinity,
)
I have a breakpoint when debugging on the line "return _image.readAsBytes();" and it is run on step 1, but after setState is called the thumbnail code is rerun, but never the line "return _image.readAsBytes();" and consequently, the image is not updated.
Perhaps i am missing something and there is no issue with the plugin.
Help appreciated.
The text was updated successfully, but these errors were encountered: