getThumbnailFromPlatformMediumModel static method

Widget getThumbnailFromPlatformMediumModel({
  1. PlatformMediumModel? platformMediumModel,
  2. double? height,
  3. double? width,
  4. BoxFit? fit,
  5. Alignment? alignment,
})

Implementation

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