백품타 랭킹 화면 필터 칩/내 순위 강조색을 테마 강조색으로 변경

학년/기간 필터 칩(ChoiceChip)의 selectedColor와 "내 순위" 행 강조 배경이
AppPalette.ink로 고정돼 있어서 테마를 적용해도 검정으로 남아있었다.
globalProfileTheme의 accent를 쓰도록 변경.
This commit is contained in:
2026-10-01 23:40:15 +00:00
parent 1d9b86d3e8
commit 2dd943d2fa
+11 -9
View File
@@ -3,6 +3,7 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import '../function/study_ranking_controller.dart'; import '../function/study_ranking_controller.dart';
import '../theme/app_palette.dart'; import '../theme/app_palette.dart';
import '../theme/theme_sync.dart';
import 'title_pill.dart'; import 'title_pill.dart';
class StudyRankingScreen extends StatefulWidget { class StudyRankingScreen extends StatefulWidget {
@@ -126,6 +127,9 @@ class _StudyRankingScreenState extends State<StudyRankingScreen> {
r['studentId'] == widget.myStudentId; r['studentId'] == widget.myStudentId;
final int rank = (r['rank'] as num).toInt(); final int rank = (r['rank'] as num).toInt();
final medalColor = _rankColor(rank); final medalColor = _rankColor(rank);
final accentColor =
globalProfileTheme.value?.accent ??
AppPalette.ink;
return Container( return Container(
margin: const EdgeInsets.only(bottom: 8), margin: const EdgeInsets.only(bottom: 8),
@@ -134,14 +138,10 @@ class _StudyRankingScreenState extends State<StudyRankingScreen> {
vertical: 12, vertical: 12,
), ),
decoration: BoxDecoration( decoration: BoxDecoration(
color: isMe color: isMe ? accentColor : AppPalette.paper,
? AppPalette.ink
: AppPalette.paper,
borderRadius: BorderRadius.circular(14), borderRadius: BorderRadius.circular(14),
border: Border.all( border: Border.all(
color: isMe color: isMe ? accentColor : AppPalette.sage,
? AppPalette.ink
: AppPalette.sage,
), ),
), ),
child: Row( child: Row(
@@ -206,14 +206,15 @@ class _StudyRankingScreenState extends State<StudyRankingScreen> {
Widget _periodChip(String value, String label) { Widget _periodChip(String value, String label) {
final bool selected = _controller.period == value; final bool selected = _controller.period == value;
final accentColor = globalProfileTheme.value?.accent ?? AppPalette.ink;
return Expanded( return Expanded(
child: ChoiceChip( child: ChoiceChip(
label: Center(child: Text(label)), label: Center(child: Text(label)),
selected: selected, selected: selected,
onSelected: (_) => _controller.setPeriod(value), onSelected: (_) => _controller.setPeriod(value),
selectedColor: AppPalette.ink, selectedColor: accentColor,
labelStyle: TextStyle( labelStyle: TextStyle(
color: selected ? Colors.white : AppPalette.ink, color: selected ? Colors.white : accentColor,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),
), ),
@@ -222,12 +223,13 @@ class _StudyRankingScreenState extends State<StudyRankingScreen> {
Widget _scopeChip(String value, String label) { Widget _scopeChip(String value, String label) {
final bool selected = _controller.scope == value; final bool selected = _controller.scope == value;
final accentColor = globalProfileTheme.value?.accent ?? AppPalette.ink;
return Expanded( return Expanded(
child: ChoiceChip( child: ChoiceChip(
label: Center(child: Text(label, style: const TextStyle(fontSize: 13))), label: Center(child: Text(label, style: const TextStyle(fontSize: 13))),
selected: selected, selected: selected,
onSelected: (_) => _controller.setScope(value), onSelected: (_) => _controller.setScope(value),
selectedColor: AppPalette.ink, selectedColor: accentColor,
backgroundColor: AppPalette.mist, backgroundColor: AppPalette.mist,
labelStyle: TextStyle( labelStyle: TextStyle(
color: selected ? Colors.white : Colors.grey[600], color: selected ? Colors.white : Colors.grey[600],