loadImage static method
Implementation
static Widget loadImage(String imageUrl, {BoxFit fit: BoxFit.cover, double? width, double? height, Widget? placeHolder, Widget? errorWidget}){
final targetPlaceHolder = placeHolder ?? Center(child: SizedBox(height: 30.0, width: 30.0, child: CircularProgressIndicator(strokeWidth: 1.5, valueColor: new AlwaysStoppedAnimation<Color>(NUIColors.NUIDarkGrayOutline), backgroundColor: NUIColors.NUISkeletalGray)));
return CachedNetworkImage(
imageUrl: imageUrl,
width: width,
height: height,
fit: fit,
placeholder: (context, url) => targetPlaceHolder,
errorWidget: (context, url, error) => errorWidget ?? Center(child: Icon(LineAwesomeIcons.exclamation, color: NUIColors.NUISkeletalGray, size: 24,)),
);
}