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
+6 -11
View File
@@ -1,7 +1,5 @@
import 'package:flutter/material.dart';
import '../../core/theme/design_tokens.dart';
class AppPressable extends StatefulWidget {
const AppPressable({
super.key,
@@ -25,25 +23,22 @@ class _AppPressableState extends State<AppPressable> {
@override
Widget build(BuildContext context) {
final colorScheme = Theme.of(context).colorScheme;
return AnimatedScale(
scale: _isPressed ? widget.pressedScale : 1,
duration: const Duration(milliseconds: 110),
curve: Curves.easeOut,
child: Material(
color: Colors.transparent,
color: colorScheme.surface.withValues(alpha: 0),
child: InkWell(
borderRadius: widget.borderRadius,
onTap: widget.onTap,
onHighlightChanged: (pressed) {
if (_isPressed == pressed) {
return;
}
setState(() {
_isPressed = pressed;
});
if (_isPressed == pressed) return;
setState(() => _isPressed = pressed);
},
splashColor: AppColors.blue100.withValues(alpha: 0.32),
highlightColor: AppColors.blue50.withValues(alpha: 0.28),
splashColor: colorScheme.primary.withValues(alpha: 0.12),
highlightColor: colorScheme.primary.withValues(alpha: 0.08),
child: widget.child,
),
),