buildNetWorkImage function
Widget
buildNetWorkImage(
- String url,
- {dynamic fit = BoxFit.cover,
- dynamic defaultImageAssetPath = ""}
cached network image
Implementation
Widget buildNetWorkImage(String url,
{fit= BoxFit.cover, defaultImageAssetPath = ""}) {
return CachedNetworkImage(
imageUrl: url,
imageBuilder: (context, imageProvider) => Container(
decoration: BoxDecoration(
image: DecorationImage(
image: imageProvider,
fit: fit,
),
),
),
placeholder: (context, url) => CircularProgressIndicator(),
errorWidget: (context, url, error) => CircularProgressIndicator(),
);
}