백품타 랭킹 화면 필터 칩/내 순위 강조색을 테마 강조색으로 변경
학년/기간 필터 칩(ChoiceChip)의 selectedColor와 "내 순위" 행 강조 배경이 AppPalette.ink로 고정돼 있어서 테마를 적용해도 검정으로 남아있었다. globalProfileTheme의 accent를 쓰도록 변경.
This commit is contained in:
@@ -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<StudyRankingScreen> {
|
||||
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<StudyRankingScreen> {
|
||||
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<StudyRankingScreen> {
|
||||
|
||||
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<StudyRankingScreen> {
|
||||
|
||||
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],
|
||||
|
||||
Reference in New Issue
Block a user