From f1b9f14eb05be09fa9123a7e9f496567b5cdbe43 Mon Sep 17 00:00:00 2001 From: sihoo Date: Tue, 1 Sep 2026 08:38:24 +0900 Subject: [PATCH] =?UTF-8?q?=EA=B3=84=EC=A0=95=20=EC=B6=94=EA=B0=80=20?= =?UTF-8?q?=ED=8F=BC=EC=9D=B4=20=EC=9E=91=EC=9D=80=20=EB=B0=95=EC=8A=A4=20?= =?UTF-8?q?=EC=95=88=EC=97=90=EC=84=9C=EB=8F=84=20=EB=B2=84=ED=8A=BC?= =?UTF-8?q?=EA=B9=8C=EC=A7=80=20=EB=8B=A4=20=EB=B3=B4=EC=9D=B4=EB=8F=84?= =?UTF-8?q?=EB=A1=9D=20=EC=A1=B0=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 박스 크기를 살짝 키우고(25% 크기 기준 +45%) 입력 필드를 촘촘하게 (isDense, 작은 폰트/패딩) 만들어 스크롤 없이 등록 버튼까지 모두 보이도록 함. Co-Authored-By: Claude Sonnet 5 --- lib/ui/teacher_student_management_page.dart | 68 ++++++++++++--------- 1 file changed, 40 insertions(+), 28 deletions(-) diff --git a/lib/ui/teacher_student_management_page.dart b/lib/ui/teacher_student_management_page.dart index a89a9a2..5be9c0e 100644 --- a/lib/ui/teacher_student_management_page.dart +++ b/lib/ui/teacher_student_management_page.dart @@ -397,10 +397,12 @@ class _TeacherStudentManagementPageState ); } - // 📝 [정사각형 박스 1] 신규 학생 계정 추가 폼. + // 📝 [정사각형 박스 1] 신규 학생 계정 추가 폼. 박스가 작아도 버튼까지 다 보이도록 촘촘하게 배치. Widget _buildAddAccountBox() { + const InputDecoration Function(String, IconData) fieldDecoration = + _compactFieldDecoration; return Container( - padding: const EdgeInsets.all(20), + padding: const EdgeInsets.all(10), decoration: BoxDecoration( color: Colors.white, borderRadius: BorderRadius.circular(24), @@ -418,35 +420,27 @@ class _TeacherStudentManagementPageState TextField( controller: _addIdController, keyboardType: TextInputType.number, - decoration: const InputDecoration( - labelText: '학번', - prefixIcon: Icon(Icons.badge), - ), + style: const TextStyle(fontSize: 12), + decoration: fieldDecoration('학번', Icons.badge), ), - const SizedBox(height: 12), + const SizedBox(height: 4), TextField( controller: _addNameController, - decoration: const InputDecoration( - labelText: '이름', - prefixIcon: Icon(Icons.person), - ), + style: const TextStyle(fontSize: 12), + decoration: fieldDecoration('이름', Icons.person), ), - const SizedBox(height: 12), + const SizedBox(height: 4), TextField( controller: _addPwController, obscureText: true, - decoration: const InputDecoration( - labelText: '초기 비밀번호', - prefixIcon: Icon(Icons.lock), - ), + style: const TextStyle(fontSize: 12), + decoration: fieldDecoration('초기 비밀번호', Icons.lock), ), - const SizedBox(height: 12), + const SizedBox(height: 4), DropdownButtonFormField( initialValue: _selectedGrade, - decoration: const InputDecoration( - labelText: '학년 (선택)', - prefixIcon: Icon(Icons.class_), - ), + style: const TextStyle(fontSize: 12, color: Colors.black87), + decoration: fieldDecoration('학년 (선택)', Icons.class_), items: const [ DropdownMenuItem(value: 1, child: Text('1학년')), DropdownMenuItem(value: 2, child: Text('2학년')), @@ -454,26 +448,34 @@ class _TeacherStudentManagementPageState ], onChanged: (value) => setState(() => _selectedGrade = value), ), - const SizedBox(height: 20), + const SizedBox(height: 6), SizedBox( width: double.infinity, - height: 50, + height: 30, child: ElevatedButton( onPressed: _controller.isWorking ? null : _addStudentAccount, style: ElevatedButton.styleFrom( backgroundColor: Colors.orange, foregroundColor: Colors.white, + padding: EdgeInsets.zero, shape: RoundedRectangleBorder( - borderRadius: BorderRadius.circular(12), + borderRadius: BorderRadius.circular(10), ), ), child: _controller.isWorking - ? const CircularProgressIndicator(color: Colors.white) + ? const SizedBox( + width: 16, + height: 16, + child: CircularProgressIndicator( + color: Colors.white, + strokeWidth: 2, + ), + ) : const Text( '학생 등록 완료', style: TextStyle( fontWeight: FontWeight.bold, - fontSize: 15, + fontSize: 12, ), ), ), @@ -484,6 +486,16 @@ class _TeacherStudentManagementPageState ); } + static InputDecoration _compactFieldDecoration(String label, IconData icon) { + return InputDecoration( + labelText: label, + labelStyle: const TextStyle(fontSize: 12), + prefixIcon: Icon(icon, size: 16), + isDense: true, + contentPadding: const EdgeInsets.symmetric(vertical: 4, horizontal: 8), + ); + } + // 📤 [정사각형 박스 2] 엑셀 일괄 등록 드롭존. Widget _buildExcelBox() { return DropTarget( @@ -673,9 +685,9 @@ class _TeacherStudentManagementPageState // 📐 학생 목록 타일은 "실시간 출석 확인" 목록의 타일(220x148)과 동일하게 맞춘다. final bool isWide = constraints.maxWidth >= 800; final double listWidth = constraints.maxWidth; - // 📉 계정 추가 / 엑셀 등록 칸: 정사각형 기본 크기의 25%로 축소. + // 📉 계정 추가 / 엑셀 등록 칸: 정사각형 기본 크기의 25%(+ 버튼까지 다 보이도록 확대). final double formSquareSize = - ((constraints.maxWidth - 20) / 2) * 0.25; + ((constraints.maxWidth - 20) / 2) * 0.25 * 1.45; final Widget addBoxColumn = Column( crossAxisAlignment: CrossAxisAlignment.start,