학생 목록 타일 글자 확대 + 계정 추가/엑셀 칸을 학생 타일 크기로 통일

학생 타일의 이름/상태/학년칩 폰트와 아이콘 크기를 키워 가독성을
높이고, 계정 추가/엑셀 등록 정사각형 칸의 크기를 학생 목록 타일과
동일한 크기(tileSize)로 통일했다.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
2026-09-01 00:48:43 +09:00
co-authored by Claude Sonnet 5
parent e9d31ce41e
commit eba23ecf9b
+22 -26
View File
@@ -558,47 +558,46 @@ class _TeacherStudentManagementPageState
crossAxisAlignment: CrossAxisAlignment.center,
children: [
CircleAvatar(
radius: 14,
radius: 20,
backgroundColor: needsReset ? Colors.red[50] : Colors.blue[50],
child: Icon(
needsReset ? Icons.lock_reset : Icons.person,
size: 14,
size: 20,
color: needsReset ? Colors.red : Colors.blue,
),
),
const SizedBox(height: 4),
const SizedBox(height: 6),
Text(
'$studentName ($studentId)',
textAlign: TextAlign.center,
maxLines: 1,
overflow: TextOverflow.ellipsis,
style: const TextStyle(fontWeight: FontWeight.bold, fontSize: 10),
style: const TextStyle(fontWeight: FontWeight.bold, fontSize: 15),
),
const SizedBox(height: 1),
const SizedBox(height: 2),
Text(
needsReset ? '초기화 대기중' : '정상 등록',
textAlign: TextAlign.center,
style: TextStyle(
fontSize: 8,
fontSize: 12,
color: needsReset ? Colors.red : Colors.grey,
fontWeight: needsReset ? FontWeight.bold : FontWeight.normal,
),
),
const SizedBox(height: 4),
const SizedBox(height: 6),
Wrap(
alignment: WrapAlignment.center,
spacing: 0,
runSpacing: 0,
spacing: 2,
runSpacing: 2,
children: [
Builder(
builder: (chipContext) => ActionChip(
visualDensity: VisualDensity.compact,
materialTapTargetSize: MaterialTapTargetSize.shrinkWrap,
padding: EdgeInsets.zero,
labelPadding: const EdgeInsets.symmetric(horizontal: 4),
labelPadding: const EdgeInsets.symmetric(horizontal: 6),
label: Text(
grade != null ? '$grade학년' : '미배정',
style: const TextStyle(fontSize: 8),
style: const TextStyle(fontSize: 12),
),
onPressed: () => _showGradeMenu(
chipContext,
@@ -612,22 +611,22 @@ class _TeacherStudentManagementPageState
icon: const Icon(
Icons.lock_reset,
color: Colors.purple,
size: 14,
size: 20,
),
tooltip: '기기 리셋',
padding: EdgeInsets.zero,
constraints: const BoxConstraints(minWidth: 22, minHeight: 22),
constraints: const BoxConstraints(minWidth: 30, minHeight: 30),
onPressed: () => _confirmResetDevice(studentId, studentName),
),
IconButton(
icon: const Icon(
Icons.delete_forever_rounded,
color: Colors.redAccent,
size: 14,
size: 20,
),
tooltip: '계정 영구 삭제',
padding: EdgeInsets.zero,
constraints: const BoxConstraints(minWidth: 22, minHeight: 22),
constraints: const BoxConstraints(minWidth: 30, minHeight: 30),
onPressed: () => _confirmDeleteStudent(studentId, studentName),
),
],
@@ -657,12 +656,14 @@ class _TeacherStudentManagementPageState
padding: const EdgeInsets.all(24.0),
child: LayoutBuilder(
builder: (context, constraints) {
// 🖥️ 웹(넓은 화면)은 계정 추가/엑셀 등록을 작은 정사각형 2칸으로 나란히, 폰은 기존처럼 세로로 쌓는다.
// 🖥️ 웹(넓은 화면)은 계정 추가/엑셀 등록을 정사각형 2칸으로 나란히, 폰은 기존처럼 세로로 쌓는다.
final bool isWide = constraints.maxWidth >= 800;
// 📉 계정 추가 / 엑셀 등록 칸: 기존 정사각형 크기의 25%로 축소.
final double formSquareSize =
((constraints.maxWidth - 20) / 2) * 0.25;
final double listWidth = constraints.maxWidth;
// 📐 학생 목록 타일과 동일한 크기를 계정 추가/엑셀 등록 칸에도 사용한다.
final double tileSize =
((listWidth - (isWide ? 7 : 3) * 10) / (isWide ? 8 : 4)) *
1.5;
final double formSquareSize = tileSize;
final Widget addBoxColumn = Column(
crossAxisAlignment: CrossAxisAlignment.start,
@@ -760,14 +761,9 @@ class _TeacherStudentManagementPageState
: GridView.builder(
shrinkWrap: true,
physics: const NeverScrollableScrollPhysics(),
// 📈 학생 타일: 기존(8/4열 기준) 한 칸 폭보다 50% 더 큰 정사각형으로.
gridDelegate:
SliverGridDelegateWithMaxCrossAxisExtent(
maxCrossAxisExtent:
((listWidth -
(isWide ? 7 : 3) * 10) /
(isWide ? 8 : 4)) *
1.5,
maxCrossAxisExtent: tileSize,
crossAxisSpacing: 10,
mainAxisSpacing: 10,
childAspectRatio: 1,