opt: get theme color

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2025-04-28 21:32:30 +08:00
parent 451a84e696
commit ca993df0c6
149 changed files with 4415 additions and 4803 deletions

View File

@@ -20,6 +20,7 @@ class _RankPageState extends State<RankPage>
@override
Widget build(BuildContext context) {
final theme = Theme.of(context);
super.build(context);
return Row(
children: [
@@ -45,8 +46,8 @@ class _RankPageState extends State<RankPage>
},
child: ColoredBox(
color: index == _rankController.tabIndex.value
? Theme.of(context).colorScheme.onInverseSurface
: Theme.of(context).colorScheme.surface,
? theme.colorScheme.onInverseSurface
: theme.colorScheme.surface,
child: Row(
mainAxisSize: MainAxisSize.min,
children: [
@@ -54,7 +55,7 @@ class _RankPageState extends State<RankPage>
height: double.infinity,
width: 3,
color: index == _rankController.tabIndex.value
? Theme.of(context).colorScheme.primary
? theme.colorScheme.primary
: Colors.transparent,
),
Expanded(
@@ -66,12 +67,10 @@ class _RankPageState extends State<RankPage>
child: Text(
tabsConfig[index]['label'],
style: TextStyle(
color: index ==
_rankController.tabIndex.value
? Theme.of(context).colorScheme.primary
: Theme.of(context)
.colorScheme
.onSurface,
color:
index == _rankController.tabIndex.value
? theme.colorScheme.primary
: theme.colorScheme.onSurface,
fontSize: 15,
),
maxLines: 1,