diff --git a/lib/ui/study_ranking_screen.dart b/lib/ui/study_ranking_screen.dart index 7e4262e..669a334 100644 --- a/lib/ui/study_ranking_screen.dart +++ b/lib/ui/study_ranking_screen.dart @@ -3,6 +3,7 @@ import 'package:flutter/material.dart'; import '../function/study_ranking_controller.dart'; import '../theme/app_palette.dart'; +import '../theme/theme_sync.dart'; import 'title_pill.dart'; class StudyRankingScreen extends StatefulWidget { @@ -126,6 +127,9 @@ class _StudyRankingScreenState extends State { r['studentId'] == widget.myStudentId; final int rank = (r['rank'] as num).toInt(); final medalColor = _rankColor(rank); + final accentColor = + globalProfileTheme.value?.accent ?? + AppPalette.ink; return Container( margin: const EdgeInsets.only(bottom: 8), @@ -134,14 +138,10 @@ class _StudyRankingScreenState extends State { vertical: 12, ), decoration: BoxDecoration( - color: isMe - ? AppPalette.ink - : AppPalette.paper, + color: isMe ? accentColor : AppPalette.paper, borderRadius: BorderRadius.circular(14), border: Border.all( - color: isMe - ? AppPalette.ink - : AppPalette.sage, + color: isMe ? accentColor : AppPalette.sage, ), ), child: Row( @@ -206,14 +206,15 @@ class _StudyRankingScreenState extends State { Widget _periodChip(String value, String label) { final bool selected = _controller.period == value; + final accentColor = globalProfileTheme.value?.accent ?? AppPalette.ink; return Expanded( child: ChoiceChip( label: Center(child: Text(label)), selected: selected, onSelected: (_) => _controller.setPeriod(value), - selectedColor: AppPalette.ink, + selectedColor: accentColor, labelStyle: TextStyle( - color: selected ? Colors.white : AppPalette.ink, + color: selected ? Colors.white : accentColor, fontWeight: FontWeight.bold, ), ), @@ -222,12 +223,13 @@ class _StudyRankingScreenState extends State { Widget _scopeChip(String value, String label) { final bool selected = _controller.scope == value; + final accentColor = globalProfileTheme.value?.accent ?? AppPalette.ink; return Expanded( child: ChoiceChip( label: Center(child: Text(label, style: const TextStyle(fontSize: 13))), selected: selected, onSelected: (_) => _controller.setScope(value), - selectedColor: AppPalette.ink, + selectedColor: accentColor, backgroundColor: AppPalette.mist, labelStyle: TextStyle( color: selected ? Colors.white : Colors.grey[600],