From 4f23a492abaaac63f767a02992e5ae8ef3d32763 Mon Sep 17 00:00:00 2001 From: minie4 Date: Sun, 25 Feb 2024 20:25:36 +0100 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20Calculate=20number=20of=20columns?= =?UTF-8?q?=20depending=20on=20screen=20size?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/mixing_tab.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/mixing_tab.dart b/lib/mixing_tab.dart index adfb68a..c8b2666 100644 --- a/lib/mixing_tab.dart +++ b/lib/mixing_tab.dart @@ -12,7 +12,7 @@ class _MixingTabState extends State { @override Widget build(BuildContext context) { double screenWidth = MediaQuery.of(context).size.width; - int cols = screenWidth > 550 ? 2 : 1; + int cols = 1 + (screenWidth ~/ 550); int cardHeight = 110; return SizedBox.expand(