web 너비 제한

This commit is contained in:
2025-10-25 17:12:32 +09:00
parent 660d4b8136
commit 19f99989b8
4 changed files with 37875 additions and 37845 deletions
+17
View File
@@ -56,6 +56,8 @@ class MyApp extends StatelessWidget {
return MaterialApp(
navigatorKey: navigatorKey, // 인증 오류 처리를 위한 전역 네비게이터 키
title: '볼링 매니저',
// 테마 자동 전환 비활성화(항상 라이트 테마)
themeMode: ThemeMode.light,
theme: ThemeData(
colorScheme: ColorScheme.fromSeed(seedColor: Colors.blue),
useMaterial3: true,
@@ -147,6 +149,21 @@ class MyApp extends StatelessWidget {
Locale('en', 'US'),
],
locale: const Locale('ko', 'KR'),
// 전역 레이아웃 래퍼: 큰 화면에서 최대 폭 제한 및 좌우 패딩 적용
builder: (context, child) {
const double maxWidth = 1200;
return Container(
alignment: Alignment.topCenter,
color: Theme.of(context).colorScheme.background,
child: Padding(
padding: const EdgeInsets.symmetric(horizontal: 16),
child: ConstrainedBox(
constraints: const BoxConstraints(maxWidth: maxWidth),
child: child,
),
),
);
},
home: authService.isAuthenticated ? const HomeScreen() : const LoginScreen(),
routes: {
'/login': (context) => const LoginScreen(),