공부 타이머 통계 박스 오버플로우 수정
초단위까지 표시하면서 "50시간 57분 0초"처럼 길어진 값이 줄바꿈되며 박스 밖으로 넘치던 문제를, FittedBox로 한 줄에 맞게 자동 축소되도록 수정. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -507,20 +507,25 @@ class _StudyTimerScreenState extends State<StudyTimerScreen>
|
|||||||
|
|
||||||
Widget _statBox(String label, String value) {
|
Widget _statBox(String label, String value) {
|
||||||
return Container(
|
return Container(
|
||||||
width: 100,
|
width: 108,
|
||||||
padding: const EdgeInsets.symmetric(vertical: 14),
|
padding: const EdgeInsets.symmetric(vertical: 14, horizontal: 6),
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: AppPalette.paper,
|
color: AppPalette.paper,
|
||||||
borderRadius: BorderRadius.circular(16),
|
borderRadius: BorderRadius.circular(16),
|
||||||
border: Border.all(color: AppPalette.sage),
|
border: Border.all(color: AppPalette.sage),
|
||||||
),
|
),
|
||||||
child: Column(
|
child: Column(
|
||||||
|
mainAxisSize: MainAxisSize.min,
|
||||||
children: [
|
children: [
|
||||||
Text(label, style: TextStyle(color: Colors.grey[600], fontSize: 12)),
|
Text(label, style: TextStyle(color: Colors.grey[600], fontSize: 12)),
|
||||||
const SizedBox(height: 4),
|
const SizedBox(height: 4),
|
||||||
Text(
|
FittedBox(
|
||||||
value,
|
fit: BoxFit.scaleDown,
|
||||||
style: const TextStyle(fontWeight: FontWeight.bold, fontSize: 15),
|
child: Text(
|
||||||
|
value,
|
||||||
|
maxLines: 1,
|
||||||
|
style: const TextStyle(fontWeight: FontWeight.bold, fontSize: 15),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
|||||||
Reference in New Issue
Block a user