我正在创建一个应用程序,其中使用了一些DecorationImage
。我的图像的显示速度确实很慢,有时在ListView中闪烁。有没有办法压缩它们?
我知道Image.file
上有该参数,但不能在DecorationImage
小部件中使用。
child : Container(
height: 350.0,
decoration: BoxDecoration(
image: DecorationImage(
image: FileImage(File(item.image)),
alignment: Alignment.topCenter,
fit: BoxFit.cover
),