Fix layout on site (menu view)

This commit is contained in:
Thomas Fransolet 2024-04-24 17:28:00 +02:00
parent 4b32d8ce90
commit f02dae6de7
3 changed files with 5 additions and 5 deletions

Binary file not shown.

View File

@ -66,7 +66,7 @@ class _MenuView extends State<MenuView> {
return Center( return Center(
child: GridView.builder( child: GridView.builder(
shrinkWrap: true, shrinkWrap: true,
gridDelegate: new SliverGridDelegateWithFixedCrossAxisCount(crossAxisCount: 3, childAspectRatio: kIsWeb ? 1.7 : 1.2), gridDelegate: new SliverGridDelegateWithFixedCrossAxisCount(crossAxisCount: 3, childAspectRatio: kIsWeb ? 1.7 : 1.3),
itemCount: menuDTO.sections!.length, itemCount: menuDTO.sections!.length,
itemBuilder: (BuildContext context, int index) { itemBuilder: (BuildContext context, int index) {
return InkWell( return InkWell(
@ -87,8 +87,8 @@ class _MenuView extends State<MenuView> {
}, },
child: Container( child: Container(
decoration: isImageBackground ? boxDecoration(appContext, menuDTO.sections![index], false) : null, decoration: isImageBackground ? boxDecoration(appContext, menuDTO.sections![index], false) : null,
padding: const EdgeInsets.all(12), padding: const EdgeInsets.all(20),
margin: EdgeInsets.symmetric(vertical: 8, horizontal: 8), margin: EdgeInsets.symmetric(vertical: 15, horizontal: 15),
child: isImageBackground ? Align( child: isImageBackground ? Align(
alignment: Alignment.bottomRight, alignment: Alignment.bottomRight,
child: FractionallySizedBox( child: FractionallySizedBox(
@ -124,7 +124,7 @@ class _MenuView extends State<MenuView> {
flex: 7, flex: 7,
child: Container( child: Container(
decoration: BoxDecoration( decoration: BoxDecoration(
color: menuDTO.sections![index].imageSource == null ? kBackgroundColor : null, // default color if no image color: menuDTO.sections![index].imageSource == null && menuDTO.sections![index].type != SectionType.Video ? 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.contain, // contain or cover ? fit: BoxFit.contain, // contain or cover ?

View File

@ -15,7 +15,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
# In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion. # In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion.
# Read more about iOS versioning at # Read more about iOS versioning at
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
version: 2.0.6+13 version: 2.0.6+14
environment: environment:
sdk: ">=3.1.0 <4.0.0" sdk: ">=3.1.0 <4.0.0"