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
@@ -24,13 +24,15 @@ class HomeAttachmentStrip extends StatelessWidget {
return const SizedBox.shrink();
}
final colorScheme = Theme.of(context).colorScheme;
return Container(
key: homeAttachmentStripKey,
padding: const EdgeInsets.all(AppSpacing.sm),
decoration: BoxDecoration(
color: AppColors.homeAttachmentSurface,
color: colorScheme.surfaceContainerLow,
borderRadius: BorderRadius.circular(AppRadius.xl),
border: Border.all(color: AppColors.homeComposerBorder),
border: Border.all(color: colorScheme.outlineVariant),
),
child: Wrap(
spacing: AppSpacing.sm,
@@ -55,6 +57,7 @@ class _AttachmentPreviewTile extends StatelessWidget {
@override
Widget build(BuildContext context) {
const previewExtent = AppSpacing.xxl * 3 + AppSpacing.sm;
final colorScheme = Theme.of(context).colorScheme;
return Stack(
children: [
@@ -69,12 +72,12 @@ class _AttachmentPreviewTile extends StatelessWidget {
return Container(
width: previewExtent,
height: previewExtent,
color: AppColors.white,
color: colorScheme.surface,
alignment: Alignment.center,
child: const Icon(
child: Icon(
LucideIcons.image,
size: AppSpacing.xl,
color: AppColors.slate400,
color: colorScheme.onSurfaceVariant,
),
);
},
@@ -88,14 +91,14 @@ class _AttachmentPreviewTile extends StatelessWidget {
child: Container(
width: AppSpacing.lg + AppSpacing.sm,
height: AppSpacing.lg + AppSpacing.sm,
decoration: const BoxDecoration(
color: AppColors.red500,
decoration: BoxDecoration(
color: colorScheme.error,
shape: BoxShape.circle,
),
child: const Icon(
child: Icon(
LucideIcons.x,
size: AppSpacing.md,
color: AppColors.white,
color: colorScheme.onError,
),
),
),