fix multi hero share the same tag

hmxc
小赖 4 years ago
parent 61e9dd5666
commit bee4fe3387

@ -82,21 +82,18 @@ class MyEventCard extends StatelessWidget {
tag: ImgModel.first(model.imgUrl), tag: ImgModel.first(model.imgUrl),
); );
}, },
child: Hero( child: Container(
tag: ImgModel.first(model.imgUrl), clipBehavior: Clip.antiAlias,
child: Container( decoration: BoxDecoration(
clipBehavior: Clip.antiAlias, color: Colors.black12,
decoration: BoxDecoration( borderRadius: BorderRadius.circular(8.w),
color: Colors.black12, ),
borderRadius: BorderRadius.circular(8.w), child: FadeInImage.assetNetwork(
), placeholder: R.ASSETS_IMAGES_PLACEHOLDER_WEBP,
child: FadeInImage.assetNetwork( image: API.image(ImgModel.first(model.imgUrl)),
placeholder: R.ASSETS_IMAGES_PLACEHOLDER_WEBP, width: 152.w,
image: API.image(ImgModel.first(model.imgUrl)), height: 152.w,
width: 152.w, fit: BoxFit.cover,
height: 152.w,
fit: BoxFit.cover,
),
), ),
), ),
), ),

Loading…
Cancel
Save