feat: 实现日历提醒完整功能(操作执行、通知服务重构、归档)
- 新增 ReminderActionExecutor 处理取消/稍后提醒操作 - 新增 ReminderOutboxStore 本地存储待处理操作 - 重构 LocalNotificationService 支持聚合提醒和交互操作 - 新增 event_color_resolver 工具类统一颜色解析 - 新增 CalendarService.archiveEvent 归档方法 - 增强 ModelTracking 支持缓存命中、推理token和成本追踪 - 添加 qwen3.5-35b-a3b 模型配置 - 更新 AndroidManifest 全屏intent权限 - 补充相关单元测试和文档
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_test/flutter_test.dart';
|
||||
import 'package:social_app/core/theme/design_tokens.dart';
|
||||
import 'package:social_app/features/calendar/data/models/schedule_item_model.dart';
|
||||
import 'package:social_app/features/calendar/ui/utils/event_color_resolver.dart';
|
||||
|
||||
void main() {
|
||||
test('returns gray for archived status regardless of custom color', () {
|
||||
final color = resolveEventColor(
|
||||
status: ScheduleStatus.archived,
|
||||
colorHex: '#EF4444',
|
||||
);
|
||||
|
||||
expect(color, AppColors.slate400);
|
||||
});
|
||||
|
||||
test('returns parsed color for active status', () {
|
||||
final color = resolveEventColor(
|
||||
status: ScheduleStatus.active,
|
||||
colorHex: '#3B82F6',
|
||||
);
|
||||
|
||||
expect(color.value, const Color(0xFF3B82F6).value);
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user