From: Tomi Leppänen Date: Mon, 18 Nov 2024 12:43:19 +0000 (+0200) Subject: Make app grid element padding dynamic X-Git-Tag: 19.90.0~1 X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=commitdiff_plain;h=b3a67fde51e2e9f1554e8a0e13a872d9092c0b92;p=apps%2Fflutter-ics-homescreen.git Make app grid element padding dynamic 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 --- 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(