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,