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

@@ -78,19 +78,20 @@ class PageUtils {
if (isLive) {
shutdownTimerService.waitForPlayingCompleted = false;
}
PageUtils.showVideoBottomSheet(
showVideoBottomSheet(
context,
isFullScreen: () => isFullScreen,
child: StatefulBuilder(
builder: (_, setState) {
final ThemeData theme = Theme.of(context);
return Theme(
data: Theme.of(context),
data: theme,
child: Material(
color: Colors.transparent,
child: Container(
clipBehavior: Clip.hardEdge,
decoration: BoxDecoration(
color: Theme.of(context).colorScheme.surface,
color: theme.colorScheme.surface,
borderRadius: const BorderRadius.all(Radius.circular(12)),
),
margin: const EdgeInsets.all(12),
@@ -140,9 +141,7 @@ class PageUtils {
child: Text(
'取消',
style: TextStyle(
color: Theme.of(context)
.colorScheme
.outline),
color: theme.colorScheme.outline),
),
),
TextButton(
@@ -179,7 +178,7 @@ class PageUtils {
choice
? Icon(
Icons.done,
color: Theme.of(context).colorScheme.primary,
color: theme.colorScheme.primary,
)
: null,
),

View File

@@ -517,6 +517,7 @@ class Utils {
SmartDialog.show(
animationType: SmartAnimationType.centerFade_otherSlide,
builder: (context) {
final ThemeData theme = Theme.of(context);
return AlertDialog(
title: const Text('🎉 发现新版本 '),
content: SizedBox(
@@ -541,7 +542,7 @@ class Utils {
child: Text(
"点此查看完整更新(即commit)内容",
style: TextStyle(
color: Theme.of(context).colorScheme.primary,
color: theme.colorScheme.primary,
),
),
),
@@ -558,7 +559,7 @@ class Utils {
child: Text(
'不再提醒',
style: TextStyle(
color: Theme.of(context).colorScheme.outline,
color: theme.colorScheme.outline,
),
),
),
@@ -567,7 +568,7 @@ class Utils {
child: Text(
'取消',
style: TextStyle(
color: Theme.of(context).colorScheme.outline,
color: theme.colorScheme.outline,
),
),
),