Banner method

Widget Banner()

Implementation

Widget Banner() {
  return SizedBox(
    height: bannerHeight,
    width: bannerWidth,
    child: Stack(
      children: [
        if (media != null)
          Positioned.fill(
            child: media is Image
                ? Container(
                    decoration: BoxDecoration(
                      image: DecorationImage(
                        image: (media as Image).image,
                        fit: BoxFit.cover,
                      ),
                    ),
                  )
                : media is Container
                    ? media!
                    : SizedBox.shrink(),
          ),
        Column(
          crossAxisAlignment: CrossAxisAlignment.start,
          children: [
            Padding(
              padding: const EdgeInsets.all(16.0),
              child: AppTypography.title(
                title,
                TitleType.h5,
                color: textColor ?? Colors.brown,
              ),
            ),
            Padding(
              padding: const EdgeInsets.symmetric(horizontal: 16.0),
              child: AppTypography.body(
                content,
                BodySize.large,
                color: contentTextColor ?? Colors.black,
              ),
            ),
          ],
        ),
      ],
    ),
  );
}