feat: 实现日历提醒 in-app fallback 机制及通知服务重构

This commit is contained in:
zl-q
2026-03-20 01:30:34 +08:00
parent 7fd536e976
commit d574128815
55 changed files with 4565 additions and 647 deletions
@@ -8,12 +8,14 @@ class DetailHeaderActionItem<T> {
required this.label,
required this.icon,
this.isDestructive = false,
this.enabled = true,
});
final T value;
final String label;
final IconData icon;
final bool isDestructive;
final bool enabled;
}
class DetailHeaderActionMenu<T> extends StatefulWidget {
@@ -141,7 +143,7 @@ class _DetailHeaderActionMenuState<T> extends State<DetailHeaderActionMenu<T>> {
Widget _buildMenuItem(DetailHeaderActionItem<T> item) {
final textColor = item.isDestructive
? AppColors.red500
: AppColors.slate700;
: (item.enabled ? AppColors.slate700 : AppColors.slate400);
final pressedColor = item.isDestructive
? AppColors.feedbackErrorSurface
: AppColors.surfaceInfoLight;
@@ -152,9 +154,9 @@ class _DetailHeaderActionMenuState<T> extends State<DetailHeaderActionMenu<T>> {
color: Colors.transparent,
child: InkWell(
borderRadius: BorderRadius.circular(AppRadius.md),
splashColor: pressedColor,
highlightColor: pressedColor,
onTap: () => _handleSelect(item.value),
splashColor: item.enabled ? pressedColor : Colors.transparent,
highlightColor: item.enabled ? pressedColor : Colors.transparent,
onTap: item.enabled ? () => _handleSelect(item.value) : null,
child: Padding(
padding: const EdgeInsets.symmetric(horizontal: AppSpacing.md),
child: Row(