feat:增加日程模块

This commit is contained in:
2026-04-26 14:23:32 +08:00
parent 57c6e552d4
commit 8f6e4cc23e
13 changed files with 905 additions and 518 deletions

View File

@@ -1,24 +1,26 @@
class Task {
final String id;
final int id;
String title;
String? description;
DateTime createdAt;
String? desc;
DateTime? dueDate;
DateTime? scheduleDate;
bool isCompleted;
Priority priority;
String? category;
DateTime createTime;
Task({
String? id,
int? id,
required this.title,
this.description,
DateTime? createdAt,
this.desc,
this.dueDate,
this.scheduleDate,
this.isCompleted = false,
this.priority = Priority.medium,
this.category,
}) : id = id ?? DateTime.timestamp().microsecond.toString(),
createdAt = createdAt ?? DateTime.now();
DateTime? createTime,
}) : id = id ?? DateTime.timestamp().microsecond,
createTime = DateTime.now();
}
enum Priority { low, medium, high }