diff --git a/lib/ui/main_dashboard.dart b/lib/ui/main_dashboard.dart index a1bab77..3511da3 100644 --- a/lib/ui/main_dashboard.dart +++ b/lib/ui/main_dashboard.dart @@ -3,6 +3,7 @@ // 타일 배치(위치/크기)는 사용자가 직접 편집할 수 있고, 계정별로 서버에 저장된다 // (lib/function/dashboard_layout_controller.dart). 캔버스는 가로 6칸×세로 4칸, // 타일 크기는 1x1~4x4. +import 'package:flutter/foundation.dart' show kIsWeb; import 'package:flutter/material.dart'; import 'package:flutter_staggered_grid_view/flutter_staggered_grid_view.dart'; import '../function/dashboard_layout_controller.dart'; @@ -771,8 +772,12 @@ class _MainDashboardState extends State { child: LayoutBuilder( builder: (context, constraints) { final double width = constraints.maxWidth; - // 🔲 정사각형 1칸 기준 4×3 배치 — 화면이 넓어도 6칸까지 늘리지 않고 4칸에서 멈춘다. - final int crossAxisCount = width < 420 + // 🔲 정사각형 1칸 기준 배치. PC로 접속한 웹(넓은 화면)에서는 6칸까지 늘려서 + // 타일이 한 화면에 다 들어오게 하고(스크롤/바운스 자체가 안 생기게), 폰 화면이나 + // 앱(Android)에서는 기존처럼 4칸에서 멈춘다. + final int crossAxisCount = kIsWeb && width >= 900 + ? 6 + : width < 420 ? 2 : width < 700 ? 3