Reputation: 752
I am receiving images from a TCP server in my flutter/dart application. Everytime I load an image in memory, I refresh the display but the refresh if not smooth at all. There is a gap where the image disappear and then reappears.
I'm using the constructor Image.memory
to build to image. So far I've tried:
In every case, first the old image disappear, and then the second image appears. Is it due to the implementation of Image.network or is something else wrong in my code ? How can I avoid that "fluttering" of the image.
Upvotes: 2
Views: 3229
Reputation: 752
Along the old tradition of finding the solution right after spending 2 hrs searching for it and finally asking on StackOverflow one simply has to do Image.memory(last_loaded_img, gaplessPlayback: true)
Upvotes: 6