BoxFit.contain in menu

This commit is contained in:
Thomas Fransolet 2024-04-24 15:09:41 +02:00
parent b7c4032a17
commit a684eed3c1

View File

@ -127,7 +127,7 @@ class _MenuView extends State<MenuView> {
color: menuDTO.sections![index].imageSource == null ? kBackgroundColor : null, // default color if no image color: menuDTO.sections![index].imageSource == null ? kBackgroundColor : null, // default color if no image
shape: BoxShape.rectangle, shape: BoxShape.rectangle,
image: menuDTO.sections![index].imageSource != null || menuDTO.sections![index].type == SectionType.Video ? new DecorationImage( image: menuDTO.sections![index].imageSource != null || menuDTO.sections![index].type == SectionType.Video ? new DecorationImage(
fit: BoxFit.cover, fit: BoxFit.contain, // contain or cover ?
image: ImageCustomProvider.getImageProvider(appContext, menuDTO.sections![index].imageId, menuDTO.sections![index].type == SectionType.Video ? getYoutubeThumbnailUrl(menuDTO.sections![index]) : menuDTO.sections![index].imageSource!), image: ImageCustomProvider.getImageProvider(appContext, menuDTO.sections![index].imageId, menuDTO.sections![index].type == SectionType.Video ? getYoutubeThumbnailUrl(menuDTO.sections![index]) : menuDTO.sections![index].imageSource!),
): null, ): null,
), ),