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

@@ -35,9 +35,6 @@ class _AboutPageState extends State<AboutPage> {
late int _pressCount = 0;
late Color outline;
late TextStyle subTitleStyle;
@override
void initState() {
super.initState();
@@ -56,16 +53,11 @@ class _AboutPageState extends State<AboutPage> {
currentVersion.value = "${currentInfo.version}+$buildNumber";
}
@override
void didChangeDependencies() {
super.didChangeDependencies();
outline = Theme.of(context).colorScheme.outline;
subTitleStyle =
TextStyle(fontSize: 13, color: Theme.of(context).colorScheme.outline);
}
@override
Widget build(BuildContext context) {
final theme = Theme.of(context);
final outline = theme.colorScheme.outline;
final subTitleStyle = TextStyle(fontSize: 13, color: outline);
return Scaffold(
appBar:
widget.showAppBar == false ? null : AppBar(title: const Text('关于')),
@@ -107,8 +99,7 @@ class _AboutPageState extends State<AboutPage> {
title: Text(
'PiliPlus',
textAlign: TextAlign.center,
style:
Theme.of(context).textTheme.titleMedium!.copyWith(height: 2),
style: theme.textTheme.titleMedium!.copyWith(height: 2),
),
subtitle: Row(
mainAxisAlignment: MainAxisAlignment.center,
@@ -153,7 +144,7 @@ Commit Hash: ${BuildConfig.commitHash}''',
Divider(
thickness: 1,
height: 30,
color: Theme.of(context).colorScheme.outlineVariant,
color: theme.colorScheme.outlineVariant,
),
ListTile(
onTap: () => PageUtils.launchURL(_sourceCodeUrl),