getImageFromURL static method
Implementation
static Widget getImageFromURL(
{required String url,
double? height,
double? width,
BoxFit? fit,
Alignment? alignment}) {
try {
return FadeInImage.memoryNetwork(
placeholder: kTransparentImage,
image: url,
fit: BoxFit.cover,
height: double.infinity,
width: double.infinity,
alignment: Alignment.center,
);
} catch (_) {
return Image(
image: AssetImage('assets/images/image_not_available.png'),
height: height,
width: width);
}
}