我有一个列表视图,其中加载了api中的图像,我注意到,当偶尔滚动一次时,图像会消失几秒钟.以下是图像部分的代码:
Container(
padding: EdgeInsets.only(top:5.0,left:15.0,right:1.0,bottom:0.0),
constraints: new BoxConstraints.expand(
height: 130.0,
width: 150.0,
),
decoration: new BoxDecoration(
image: new DecorationImage(
image: NetworkImage(artworksAndEventsFinal[index]['thumbnail']),fit: BoxFit.cover,),
),
child: new Stack(
children: <Widget>[
new Positioned(
right: 0.0,
bottom: 0.0,
child: Container(
height: 24.0,
padding: EdgeInsets.only(top:5.0,left:10.0,right:5.0,bottom:5.0),
decoration: new BoxDecoration(
color: Theme.of(context).primaryColor,
),
child: new Text(artworksAndEventsFinal[index]['year'],
style: new TextStyle(
fontWeight: FontWeight.bold,
fontSize: 11.0,
color: Colors.white
)
),
)
),
new Positioned(
right: 3.0,
top: 0.0,
child: new Icon(Icons.favorite_border,color:
Colors.white,),
),
],
)
),