1

When a user uploads an image that has a big size, the application will freeze at the moment(Is the app calculating?).

How to fix it to smooth. The Image.network has a leadingBuilder property but the Image.memory doesn't have this property.

And another similar problem. When the Image.memory is assigned in the x parameter and another widget is y. When I use setState for swapping the widget x and y in the Card widget. The web always freezes for a while that the widget swap from y to x(From another widget to Image.memory widget that contain the image with big size).

The example: https://user-images.githubusercontent.com/59549741/165982975-51cbbe78-1c3e-4392-95a0-2654395c68b3.mp4

  • you could try [precacheImage](https://api.flutter.dev/flutter/widgets/precacheImage.html) but i am quite uncertain if it changes anything... – pskink Apr 29 '22 at 16:18
  • Hi @pskink, thank you for your method. This method doesn't help in uploading an image. I think this method is suitable to show the image that was downloaded. I can use this method on another page. Thank you so much. – Sittiphan Sittisak Apr 29 '22 at 16:48
  • I tried precacheImage. The web still freezes for a while when I assigned the Image widget in the x parameter before using precacheImage(x.image, context). I think the problem is Image.memory. – Sittiphan Sittisak Apr 30 '22 at 05:06

1 Answers1

0

This issue is technical. Follow at https://github.com/flutter/flutter/issues/102828