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:
- Loading a new image as Uint8List and using setState() to reload the page and rebuild the Image.memory
- Loading an Image.memory, adding it into a StreamController and using a StreamBuilder to build the image view.
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.