I love the FadeInImage
I can do this
child: FadeInImage.assetNetwork(
image: \'https://placeimg.com/640/480/any\',
placeholder: \'assets/images/l
It's because FadeInImage
it not a type of ImageProvider
widget, you need to use AssetImage
, NetworkImage
... inside DecorationImage
.
Outside the DecorationImage
, like in a Container's child, you can use it as well.
e.g.
Container(
child: FadeInImage.memoryNetwork(
placeholder: kTransparentImage,
image: product.thumbnail,
fit: BoxFit.contain,
),
),
To know more about this widget, check it this:
Flutter Widget of The Week - FadeIn Image