전역 테마를 팔레트로 교체 + 빠졌던 팝업 화면들 마무리
앱 전체 MaterialApp의 ThemeData가 여전히 primarySwatch: Colors.indigo 였던 게 진짜 원인이었음 — 개별 화면 색은 고쳤지만, 기본 위젯 스타일 (포커스 안 된 텍스트필드 밑줄, FilterChip 선택 색 등)은 전부 이 전역 테마를 그대로 따라가고 있어서 여전히 예전 색으로 보였음. ColorScheme을 AppPalette 기준으로 재구성해 해결. 추가로 팔레트 작업에서 빠졌던 화면들도 마무리: - teacher_register_screen.dart (교사 회원가입) - nfc_tag_writer_screen.dart (NFC 태그 쓰기) - change_password_screen.dart (미사용이지만 일관성을 위해 정리) - teacher_attendance_page.dart의 주머니 번호 칩 색상 Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -7,6 +7,7 @@ import 'package:firebase_core/firebase_core.dart';
|
|||||||
import 'firebase_options.dart';
|
import 'firebase_options.dart';
|
||||||
import 'config.dart';
|
import 'config.dart';
|
||||||
import 'pocket_watch_service.dart';
|
import 'pocket_watch_service.dart';
|
||||||
|
import 'theme/app_palette.dart';
|
||||||
import 'ui/login_screen.dart';
|
import 'ui/login_screen.dart';
|
||||||
|
|
||||||
void main() async {
|
void main() async {
|
||||||
@@ -27,7 +28,22 @@ class SchoolAttendanceApp extends StatelessWidget {
|
|||||||
return MaterialApp(
|
return MaterialApp(
|
||||||
debugShowCheckedModeBanner: false,
|
debugShowCheckedModeBanner: false,
|
||||||
title: '$schoolName 학생 도우미',
|
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(), // 🚪 앱을 켜면 무조건 로그인 화면이 먼저 등장합니다.
|
home: const LoginScreen(), // 🚪 앱을 켜면 무조건 로그인 화면이 먼저 등장합니다.
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ import 'dart:convert';
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:http/http.dart' as http;
|
import 'package:http/http.dart' as http;
|
||||||
import '../config.dart';
|
import '../config.dart';
|
||||||
|
import '../theme/app_palette.dart';
|
||||||
import '../ui/login_screen.dart';
|
import '../ui/login_screen.dart';
|
||||||
|
|
||||||
// 💡 main.dart 파일의 최하단(다른 클래스 중괄호 밖)에 붙여넣으세요.
|
// 💡 main.dart 파일의 최하단(다른 클래스 중괄호 밖)에 붙여넣으세요.
|
||||||
@@ -58,6 +59,7 @@ class _ChangePasswordScreenState extends State<ChangePasswordScreen> {
|
|||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
|
backgroundColor: AppPalette.mist,
|
||||||
body: Padding(
|
body: Padding(
|
||||||
padding: const EdgeInsets.all(32.0),
|
padding: const EdgeInsets.all(32.0),
|
||||||
child: Column(
|
child: Column(
|
||||||
@@ -92,8 +94,8 @@ class _ChangePasswordScreenState extends State<ChangePasswordScreen> {
|
|||||||
height: 50,
|
height: 50,
|
||||||
child: ElevatedButton(
|
child: ElevatedButton(
|
||||||
style: ElevatedButton.styleFrom(
|
style: ElevatedButton.styleFrom(
|
||||||
backgroundColor: Colors.indigo,
|
backgroundColor: AppPalette.ink,
|
||||||
foregroundColor: Colors.white,
|
foregroundColor: AppPalette.paper,
|
||||||
),
|
),
|
||||||
onPressed: _isLoading ? null : _updatePassword,
|
onPressed: _isLoading ? null : _updatePassword,
|
||||||
child: _isLoading
|
child: _isLoading
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
// 버튼/입력폼을 그린다. NFC 세션/서버 통신은 lib/function/nfc_tag_writer_controller.dart가 담당한다.
|
// 버튼/입력폼을 그린다. NFC 세션/서버 통신은 lib/function/nfc_tag_writer_controller.dart가 담당한다.
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import '../function/nfc_tag_writer_controller.dart';
|
import '../function/nfc_tag_writer_controller.dart';
|
||||||
|
import '../theme/app_palette.dart';
|
||||||
|
|
||||||
class NfcTagWriterScreen extends StatefulWidget {
|
class NfcTagWriterScreen extends StatefulWidget {
|
||||||
const NfcTagWriterScreen({super.key});
|
const NfcTagWriterScreen({super.key});
|
||||||
@@ -49,10 +50,11 @@ class _NfcTagWriterScreenState extends State<NfcTagWriterScreen> {
|
|||||||
builder: (context, _) {
|
builder: (context, _) {
|
||||||
final bool isWriting = _controller.isWriting;
|
final bool isWriting = _controller.isWriting;
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
|
backgroundColor: AppPalette.mist,
|
||||||
appBar: AppBar(
|
appBar: AppBar(
|
||||||
title: const Text("NFC 주머니 태그 쓰기"),
|
title: const Text("NFC 주머니 태그 쓰기"),
|
||||||
backgroundColor: Colors.deepPurple,
|
backgroundColor: AppPalette.ink,
|
||||||
foregroundColor: Colors.white,
|
foregroundColor: AppPalette.paper,
|
||||||
),
|
),
|
||||||
body: Padding(
|
body: Padding(
|
||||||
padding: const EdgeInsets.all(24.0),
|
padding: const EdgeInsets.all(24.0),
|
||||||
@@ -73,7 +75,7 @@ class _NfcTagWriterScreenState extends State<NfcTagWriterScreen> {
|
|||||||
Icon(
|
Icon(
|
||||||
isWriting ? Icons.nfc : Icons.edit_note_rounded,
|
isWriting ? Icons.nfc : Icons.edit_note_rounded,
|
||||||
size: 80,
|
size: 80,
|
||||||
color: isWriting ? Colors.orange : Colors.deepPurple,
|
color: isWriting ? Colors.orange : AppPalette.ink,
|
||||||
),
|
),
|
||||||
const SizedBox(height: 16),
|
const SizedBox(height: 16),
|
||||||
Text(
|
Text(
|
||||||
@@ -87,8 +89,8 @@ class _NfcTagWriterScreenState extends State<NfcTagWriterScreen> {
|
|||||||
height: 55,
|
height: 55,
|
||||||
child: ElevatedButton(
|
child: ElevatedButton(
|
||||||
style: ElevatedButton.styleFrom(
|
style: ElevatedButton.styleFrom(
|
||||||
backgroundColor: Colors.deepPurple,
|
backgroundColor: AppPalette.ink,
|
||||||
foregroundColor: Colors.white,
|
foregroundColor: AppPalette.paper,
|
||||||
),
|
),
|
||||||
onPressed: isWriting
|
onPressed: isWriting
|
||||||
? null
|
? null
|
||||||
|
|||||||
@@ -442,15 +442,15 @@ class _TeacherAttendancePageState extends State<TeacherAttendancePage> {
|
|||||||
vertical: 3,
|
vertical: 3,
|
||||||
),
|
),
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: Colors.blue.shade50,
|
color: AppPalette.linen,
|
||||||
borderRadius: BorderRadius.circular(20),
|
borderRadius: BorderRadius.circular(20),
|
||||||
border: Border.all(color: Colors.blue.shade200),
|
border: Border.all(color: AppPalette.sage),
|
||||||
),
|
),
|
||||||
child: Text(
|
child: Text(
|
||||||
student['pocketNumber'],
|
student['pocketNumber'],
|
||||||
style: const TextStyle(
|
style: const TextStyle(
|
||||||
fontWeight: FontWeight.bold,
|
fontWeight: FontWeight.bold,
|
||||||
color: Colors.blueAccent,
|
color: AppPalette.ink,
|
||||||
fontSize: 11,
|
fontSize: 11,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
// lib/function/teacher_register_controller.dart가 담당한다.
|
// lib/function/teacher_register_controller.dart가 담당한다.
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import '../function/teacher_register_controller.dart';
|
import '../function/teacher_register_controller.dart';
|
||||||
|
import '../theme/app_palette.dart';
|
||||||
|
|
||||||
class TeacherRegisterScreen extends StatefulWidget {
|
class TeacherRegisterScreen extends StatefulWidget {
|
||||||
const TeacherRegisterScreen({super.key});
|
const TeacherRegisterScreen({super.key});
|
||||||
@@ -61,10 +62,11 @@ class _TeacherRegisterScreenState extends State<TeacherRegisterScreen> {
|
|||||||
listenable: _controller,
|
listenable: _controller,
|
||||||
builder: (context, _) {
|
builder: (context, _) {
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
|
backgroundColor: AppPalette.mist,
|
||||||
appBar: AppBar(
|
appBar: AppBar(
|
||||||
title: const Text('교사 회원가입'),
|
title: const Text('교사 회원가입'),
|
||||||
backgroundColor: Colors.indigo,
|
backgroundColor: AppPalette.ink,
|
||||||
foregroundColor: Colors.white,
|
foregroundColor: AppPalette.paper,
|
||||||
),
|
),
|
||||||
body: SingleChildScrollView(
|
body: SingleChildScrollView(
|
||||||
padding: const EdgeInsets.all(24.0),
|
padding: const EdgeInsets.all(24.0),
|
||||||
@@ -122,8 +124,8 @@ class _TeacherRegisterScreenState extends State<TeacherRegisterScreen> {
|
|||||||
height: 50,
|
height: 50,
|
||||||
child: ElevatedButton(
|
child: ElevatedButton(
|
||||||
style: ElevatedButton.styleFrom(
|
style: ElevatedButton.styleFrom(
|
||||||
backgroundColor: Colors.indigo,
|
backgroundColor: AppPalette.ink,
|
||||||
foregroundColor: Colors.white,
|
foregroundColor: AppPalette.paper,
|
||||||
),
|
),
|
||||||
onPressed: _controller.isLoading ? null : _registerTeacher,
|
onPressed: _controller.isLoading ? null : _registerTeacher,
|
||||||
child: _controller.isLoading
|
child: _controller.isLoading
|
||||||
|
|||||||
Reference in New Issue
Block a user