feat:增加日程模块

This commit is contained in:
2025-11-13 15:53:29 +08:00
parent 63719406d9
commit 54bed08b7b
15 changed files with 830 additions and 20 deletions

View File

@@ -95,7 +95,6 @@ class NotifyService {
required String body,
required DateTime scheduledTime,
}) async {
print("scheduleNotification: $id");
await _notifications.zonedSchedule(
id,
title,
@@ -110,8 +109,11 @@ class NotifyService {
// 取消特定通知
Future<void> cancelNotification(int id) async {
print("cancelNotification: $id");
await _notifications.cancel(id);
try {
await _notifications.cancel(id);
} catch(e) {
print('取消通知失败: $e');
}
}
// 取消所有通知