From 73542fa11c2357888b55199a70adcd418304b82e Mon Sep 17 00:00:00 2001 From: sihoo Date: Mon, 7 Sep 2026 23:59:59 +0900 Subject: [PATCH] =?UTF-8?q?=EB=8C=80=EC=8B=9C=EB=B3=B4=EB=93=9C=20?= =?UTF-8?q?=ED=83=80=EC=9D=BC=20=EA=B7=B8=EB=A6=AC=EB=93=9C=20=EC=97=AC?= =?UTF-8?q?=EB=B0=B1=20=ED=99=95=EB=B3=B4=20-=204=EC=97=B4=20=EA=B3=A0?= =?UTF-8?q?=EC=A0=95=20+=20=ED=81=AC=EA=B8=B0=2020%=20=EC=B6=95=EC=86=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 화면이 넓어져도 열 개수를 6개까지 늘리지 않고 4열에서 고정 - 그리드 캔버스 자체 너비를 700px로 제한하고 20% 더 줄여서, 타일이 화면을 꽉 채우는 느낌 대신 가운데에 여백을 두고 정갈하게 보이게 함 Co-Authored-By: Claude Sonnet 5 --- lib/ui/main_dashboard.dart | 45 ++++++++++++++++++++++++-------------- 1 file changed, 28 insertions(+), 17 deletions(-) diff --git a/lib/ui/main_dashboard.dart b/lib/ui/main_dashboard.dart index c45b618..fbe8c9a 100644 --- a/lib/ui/main_dashboard.dart +++ b/lib/ui/main_dashboard.dart @@ -629,28 +629,39 @@ class _MainDashboardState extends State { child: LayoutBuilder( builder: (context, constraints) { final double width = constraints.maxWidth; + // 🔲 정사각형 1칸 기준 4×3 배치 — 화면이 넓어도 6칸까지 늘리지 않고 4칸에서 멈춘다. final int crossAxisCount = width < 420 ? 2 : width < 700 ? 3 - : width < 1000 - ? 4 - : 6; + : 4; + // 📏 캔버스 자체를 700px에서 더 넓어지지 않게 막고, 타일 크기를 전체적으로 + // 20% 줄여서 화면이 꽉 차 보이지 않고 여백이 생기게 한다. + const double maxGridWidth = 700; + final double cappedWidth = width < maxGridWidth + ? width + : maxGridWidth; + final double gridWidth = cappedWidth * 0.8; - return StaggeredGrid.count( - crossAxisCount: crossAxisCount, - mainAxisSpacing: 12, - crossAxisSpacing: 12, - children: [ - for (final tile in tiles) - StaggeredGridTile.count( - crossAxisCellCount: _spanFor( - tile.id, - ).$1.clamp(1, crossAxisCount), - mainAxisCellCount: _spanFor(tile.id).$2, - child: tile.child, - ), - ], + return Center( + child: SizedBox( + width: gridWidth, + child: StaggeredGrid.count( + crossAxisCount: crossAxisCount, + mainAxisSpacing: 12, + crossAxisSpacing: 12, + children: [ + for (final tile in tiles) + StaggeredGridTile.count( + crossAxisCellCount: _spanFor( + tile.id, + ).$1.clamp(1, crossAxisCount), + mainAxisCellCount: _spanFor(tile.id).$2, + child: tile.child, + ), + ], + ), + ), ); }, ),