refactor(apps): 主题系统迁移至 ColorScheme + 扩展架构并支持 Dark Mode
This commit is contained in:
@@ -30,7 +30,7 @@ class TodoDragItem extends StatelessWidget {
|
||||
borderRadius: BorderRadius.circular(AppRadius.md),
|
||||
child: Transform.scale(
|
||||
scale: 1.03,
|
||||
child: SizedBox(width: 280, child: _buildDragFeedback()),
|
||||
child: SizedBox(width: 280, child: _buildDragFeedback(context)),
|
||||
),
|
||||
),
|
||||
childWhenDragging: AnimatedOpacity(
|
||||
@@ -44,18 +44,19 @@ class TodoDragItem extends StatelessWidget {
|
||||
);
|
||||
}
|
||||
|
||||
Widget _buildDragFeedback() {
|
||||
Widget _buildDragFeedback(BuildContext context) {
|
||||
final colorScheme = Theme.of(context).colorScheme;
|
||||
return Container(
|
||||
padding: const EdgeInsets.symmetric(
|
||||
horizontal: AppSpacing.md,
|
||||
vertical: AppSpacing.sm,
|
||||
),
|
||||
decoration: BoxDecoration(
|
||||
color: AppColors.white,
|
||||
color: colorScheme.surface,
|
||||
borderRadius: BorderRadius.circular(AppRadius.md),
|
||||
boxShadow: [
|
||||
BoxShadow(
|
||||
color: AppColors.slate400.withValues(alpha: 0.3),
|
||||
color: colorScheme.shadow.withValues(alpha: 0.2),
|
||||
blurRadius: 12,
|
||||
offset: const Offset(0, 4),
|
||||
),
|
||||
@@ -65,10 +66,10 @@ class TodoDragItem extends StatelessWidget {
|
||||
todo.title,
|
||||
maxLines: 1,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
style: const TextStyle(
|
||||
style: TextStyle(
|
||||
fontSize: 13,
|
||||
fontWeight: FontWeight.w600,
|
||||
color: AppColors.slate700,
|
||||
color: colorScheme.onSurfaceVariant,
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user