diff --git a/lib/main_client_app.dart b/lib/main_client_app.dart index d7045a4..f4091a7 100644 --- a/lib/main_client_app.dart +++ b/lib/main_client_app.dart @@ -7,6 +7,7 @@ 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'; void main() async { @@ -27,7 +28,22 @@ class SchoolAttendanceApp extends StatelessWidget { return MaterialApp( debugShowCheckedModeBanner: false, title: '$schoolName 학생 도우미', - theme: ThemeData(primarySwatch: Colors.indigo, useMaterial3: true), + 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, + ), + ), home: const LoginScreen(), // 🚪 앱을 켜면 무조건 로그인 화면이 먼저 등장합니다. ); } diff --git a/lib/screens/change_password_screen.dart b/lib/screens/change_password_screen.dart index 1528d70..9f060bf 100644 --- a/lib/screens/change_password_screen.dart +++ b/lib/screens/change_password_screen.dart @@ -3,6 +3,7 @@ import 'dart:convert'; import 'package:flutter/material.dart'; import 'package:http/http.dart' as http; import '../config.dart'; +import '../theme/app_palette.dart'; import '../ui/login_screen.dart'; // 💡 main.dart 파일의 최하단(다른 클래스 중괄호 밖)에 붙여넣으세요. @@ -58,6 +59,7 @@ class _ChangePasswordScreenState extends State { @override Widget build(BuildContext context) { return Scaffold( + backgroundColor: AppPalette.mist, body: Padding( padding: const EdgeInsets.all(32.0), child: Column( @@ -92,8 +94,8 @@ class _ChangePasswordScreenState extends State { height: 50, child: ElevatedButton( style: ElevatedButton.styleFrom( - backgroundColor: Colors.indigo, - foregroundColor: Colors.white, + backgroundColor: AppPalette.ink, + foregroundColor: AppPalette.paper, ), onPressed: _isLoading ? null : _updatePassword, child: _isLoading diff --git a/lib/ui/nfc_tag_writer_screen.dart b/lib/ui/nfc_tag_writer_screen.dart index 2146ae6..b435e4d 100644 --- a/lib/ui/nfc_tag_writer_screen.dart +++ b/lib/ui/nfc_tag_writer_screen.dart @@ -2,6 +2,7 @@ // 버튼/입력폼을 그린다. NFC 세션/서버 통신은 lib/function/nfc_tag_writer_controller.dart가 담당한다. import 'package:flutter/material.dart'; import '../function/nfc_tag_writer_controller.dart'; +import '../theme/app_palette.dart'; class NfcTagWriterScreen extends StatefulWidget { const NfcTagWriterScreen({super.key}); @@ -49,10 +50,11 @@ class _NfcTagWriterScreenState extends State { builder: (context, _) { final bool isWriting = _controller.isWriting; return Scaffold( + backgroundColor: AppPalette.mist, appBar: AppBar( title: const Text("NFC 주머니 태그 쓰기"), - backgroundColor: Colors.deepPurple, - foregroundColor: Colors.white, + backgroundColor: AppPalette.ink, + foregroundColor: AppPalette.paper, ), body: Padding( padding: const EdgeInsets.all(24.0), @@ -73,7 +75,7 @@ class _NfcTagWriterScreenState extends State { Icon( isWriting ? Icons.nfc : Icons.edit_note_rounded, size: 80, - color: isWriting ? Colors.orange : Colors.deepPurple, + color: isWriting ? Colors.orange : AppPalette.ink, ), const SizedBox(height: 16), Text( @@ -87,8 +89,8 @@ class _NfcTagWriterScreenState extends State { height: 55, child: ElevatedButton( style: ElevatedButton.styleFrom( - backgroundColor: Colors.deepPurple, - foregroundColor: Colors.white, + backgroundColor: AppPalette.ink, + foregroundColor: AppPalette.paper, ), onPressed: isWriting ? null diff --git a/lib/ui/teacher_attendance_page.dart b/lib/ui/teacher_attendance_page.dart index d014188..23c2e7f 100644 --- a/lib/ui/teacher_attendance_page.dart +++ b/lib/ui/teacher_attendance_page.dart @@ -442,15 +442,15 @@ class _TeacherAttendancePageState extends State { vertical: 3, ), decoration: BoxDecoration( - color: Colors.blue.shade50, + color: AppPalette.linen, borderRadius: BorderRadius.circular(20), - border: Border.all(color: Colors.blue.shade200), + border: Border.all(color: AppPalette.sage), ), child: Text( student['pocketNumber'], style: const TextStyle( fontWeight: FontWeight.bold, - color: Colors.blueAccent, + color: AppPalette.ink, fontSize: 11, ), ), diff --git a/lib/ui/teacher_register_screen.dart b/lib/ui/teacher_register_screen.dart index 28432e3..5e6842a 100644 --- a/lib/ui/teacher_register_screen.dart +++ b/lib/ui/teacher_register_screen.dart @@ -2,6 +2,7 @@ // lib/function/teacher_register_controller.dart가 담당한다. import 'package:flutter/material.dart'; import '../function/teacher_register_controller.dart'; +import '../theme/app_palette.dart'; class TeacherRegisterScreen extends StatefulWidget { const TeacherRegisterScreen({super.key}); @@ -61,10 +62,11 @@ class _TeacherRegisterScreenState extends State { listenable: _controller, builder: (context, _) { return Scaffold( + backgroundColor: AppPalette.mist, appBar: AppBar( title: const Text('교사 회원가입'), - backgroundColor: Colors.indigo, - foregroundColor: Colors.white, + backgroundColor: AppPalette.ink, + foregroundColor: AppPalette.paper, ), body: SingleChildScrollView( padding: const EdgeInsets.all(24.0), @@ -122,8 +124,8 @@ class _TeacherRegisterScreenState extends State { height: 50, child: ElevatedButton( style: ElevatedButton.styleFrom( - backgroundColor: Colors.indigo, - foregroundColor: Colors.white, + backgroundColor: AppPalette.ink, + foregroundColor: AppPalette.paper, ), onPressed: _controller.isLoading ? null : _registerTeacher, child: _controller.isLoading