用RefreshIndicator刷新刷新网络图像

时间:2020-05-12 11:43:18

标签: flutter

如何使用Image.network刷新在PinchZoomImage小部件中构建的http图片?

最好是使用RefreshIndicator()对我来说,但是我应该在onRefresh中调用什么呢?

它等待Future ,所以我不能在那里写setState(),它会用我的小部件重建页面。

我的代码是:

 PinchZoomImage(
              image: Image.network('https://api.myapi.com/myImage.jpg'),
              hideStatusBarWhileZooming: true,
            ),

有什么建议吗?

0 个答案:

没有答案