Files
school-attendance/lib/main_client_app.dart
T

51 lines
1.7 KiB
Dart
Raw Normal View History

2026-07-28 19:00:30 +09:00
// 🚪 앱 진입점. Firebase/백그라운드 감시 서비스 초기화 후 로그인 화면으로 시작한다.
// 실제 화면 구현은 lib/screens/ 폴더, 공통 설정은 lib/config.dart 참고.
import 'dart:io';
import 'package:flutter/foundation.dart' show kIsWeb;
import 'package:flutter/material.dart';
import 'package:firebase_core/firebase_core.dart';
import 'firebase_options.dart';
import 'config.dart';
import 'pocket_watch_service.dart';
import 'theme/app_palette.dart';
import 'ui/login_screen.dart';
2026-07-28 19:00:30 +09:00
void main() async {
WidgetsFlutterBinding.ensureInitialized();
await Firebase.initializeApp(options: DefaultFirebaseOptions.currentPlatform);
await printFCMToken();
if (!kIsWeb && Platform.isAndroid) {
await initializePocketWatchService();
}
runApp(const SchoolAttendanceApp());
}
class SchoolAttendanceApp extends StatelessWidget {
const SchoolAttendanceApp({super.key});
@override
Widget build(BuildContext context) {
return MaterialApp(
debugShowCheckedModeBanner: false,
title: '$schoolName 학생 도우미',
theme: ThemeData(
useMaterial3: true,
scaffoldBackgroundColor: AppPalette.mist,
colorScheme:
ColorScheme.fromSeed(
seedColor: AppPalette.ink,
brightness: Brightness.light,
).copyWith(
primary: AppPalette.ink,
onPrimary: AppPalette.paper,
secondary: AppPalette.ink,
onSecondary: AppPalette.paper,
surface: AppPalette.paper,
onSurface: AppPalette.ink,
),
),
2026-07-28 19:00:30 +09:00
home: const LoginScreen(), // 🚪 앱을 켜면 무조건 로그인 화면이 먼저 등장합니다.
);
}
}