buildIcon method

Widget buildIcon()

Implementation

Widget buildIcon() {
  String? imageUrl;

  if (adSize == FastAdSize.small) {
    imageUrl = ad.image.small;
  } else if (adSize == FastAdSize.medium) {
    imageUrl = ad.image.medium;
  } else if (adSize == FastAdSize.large) {
    imageUrl = ad.image.large;
  }

  if (imageUrl != null) {
    return Center(
      child: FastImageAsset(path: imageUrl, fit: BoxFit.contain),
    );
  }

  return const SizedBox.shrink();
}