buildNetWorkImage function

Widget buildNetWorkImage(
  1. String url,
  2. {dynamic fit = BoxFit.cover,
  3. 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(),
  );
}