getImageFromMediumModel static method

Widget getImageFromMediumModel({
  1. MemberMediumModel? memberMediumModel,
  2. double? height,
  3. double? width,
  4. BoxFit? fit,
  5. Alignment? alignment,
})

Implementation

static Widget getImageFromMediumModel(
    {MemberMediumModel? memberMediumModel,
    double? height,
    double? width,
    BoxFit? fit,
    Alignment? alignment}) {
  if (memberMediumModel == null) {
    return Image(
      image: AssetImage('assets/images/image_not_available.png'),
      height: height,
      width: width,
      alignment: alignment!,
    );
  } else {
    return getImageFromURL(
        url: memberMediumModel.url!, height: height, width: width);
  }
}