refactor(apps): 主题系统迁移至 ColorScheme + 扩展架构并支持 Dark Mode

This commit is contained in:
qzl
2026-03-27 19:07:39 +08:00
parent ecc1ec6ce4
commit ae29a8209b
146 changed files with 4301 additions and 3200 deletions
+17 -10
View File
@@ -18,8 +18,10 @@ Future<bool> showConfirmSheet(
final result = await showModalBottomSheet<bool>(
context: context,
isScrollControlled: true,
backgroundColor: Colors.transparent,
backgroundColor: Theme.of(context).colorScheme.surface.withValues(alpha: 0),
builder: (sheetContext) {
final colorScheme = Theme.of(sheetContext).colorScheme;
return SafeArea(
top: false,
child: Container(
@@ -31,9 +33,9 @@ Future<bool> showConfirmSheet(
),
padding: const EdgeInsets.all(AppSpacing.lg),
decoration: BoxDecoration(
color: AppColors.white,
color: colorScheme.surface,
borderRadius: BorderRadius.circular(AppRadius.xl),
border: Border.all(color: AppColors.borderSecondary),
border: Border.all(color: colorScheme.outlineVariant),
),
child: Column(
mainAxisSize: MainAxisSize.min,
@@ -42,17 +44,20 @@ Future<bool> showConfirmSheet(
Text(
title,
textAlign: TextAlign.center,
style: const TextStyle(
style: TextStyle(
fontSize: 18,
fontWeight: FontWeight.w700,
color: AppColors.slate900,
color: colorScheme.onSurface,
),
),
const SizedBox(height: AppSpacing.xs),
Text(
message,
textAlign: TextAlign.center,
style: const TextStyle(fontSize: 14, color: AppColors.slate500),
style: TextStyle(
fontSize: 14,
color: colorScheme.onSurfaceVariant,
),
),
const SizedBox(height: AppSpacing.lg),
SizedBox(
@@ -63,16 +68,18 @@ Future<bool> showConfirmSheet(
alignment: Alignment.center,
decoration: BoxDecoration(
color: isDestructive
? AppColors.feedbackErrorIcon
: AppColors.blue600,
? colorScheme.error
: colorScheme.primary,
borderRadius: BorderRadius.circular(AppRadius.full),
),
child: Text(
resolvedConfirmText,
style: const TextStyle(
style: TextStyle(
fontSize: 15,
fontWeight: FontWeight.w700,
color: AppColors.white,
color: isDestructive
? colorScheme.onError
: colorScheme.onPrimary,
),
),
),