PC 웹에서 대시보드 타일을 4칸이 아닌 6칸부터 줄바꿈하게 변경
넓은 화면(웹 + 900px 이상)에서는 타일이 한 줄에 더 많이 들어가서 관리자 계정이 아니면 스크롤 자체가 거의 필요 없어지게 함(스크롤 바운스로 생기던 파란 띠 회피). 모바일/앱에서는 기존 4칸 유지. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -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<MainDashboard> {
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user