From b3a67fde51e2e9f1554e8a0e13a872d9092c0b92 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tomi=20Lepp=C3=A4nen?= Date: Mon, 18 Nov 2024 14:43:19 +0200 Subject: [PATCH] Make app grid element padding dynamic MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Instead of defining three elements of varying size, vary the number of elements. This makes much more sense in general. The grid looks the same as before for 1080x1920 resolution but anything else will look better with this change. Bug-AGL: SPEC-5297 Change-Id: I606d39168fc4a6a6c93c7b710849d50b9757a2fb Signed-off-by: Tomi Leppänen --- lib/presentation/screens/apps/apps_content.dart | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/presentation/screens/apps/apps_content.dart b/lib/presentation/screens/apps/apps_content.dart index 18f91b6..3d3505a 100644 --- a/lib/presentation/screens/apps/apps_content.dart +++ b/lib/presentation/screens/apps/apps_content.dart @@ -35,8 +35,7 @@ class _AppsState extends ConsumerState { scrollDirection: Axis.vertical, shrinkWrap: true, itemCount: apps.length, - gridDelegate: const SliverGridDelegateWithFixedCrossAxisCount( - crossAxisCount: 3), + gridDelegate: const SliverGridDelegateWithMaxCrossAxisExtent(maxCrossAxisExtent: 300), itemBuilder: (context, index) { return GridTile( child: Container( -- 2.16.6