feat:更新主题色兼容

This commit is contained in:
2025-11-21 14:58:11 +08:00
parent 3ea162f33e
commit f133e5ce13
11 changed files with 112 additions and 75 deletions

View File

@@ -86,7 +86,7 @@ class TodoPageState extends State<TodoPage> {
),
ButtonSegment<TodoSortMode>(
value: TodoSortMode.priority,
icon: Icon(Icons.flag_outlined, size: 16,),
icon: Icon(Icons.flag_outlined, size: 16),
label: const Text('优先级', style: TextStyle(fontSize: 12)),
),
],
@@ -123,13 +123,16 @@ class TodoPageState extends State<TodoPage> {
// 切换待办事项完成状态
void _toggleTodo(Todo todo) async {
await notifyService.cancelNotification(todo.id);
final bool? result = await showConfirmDialog(context, '确定已完成该待办吗?');
if (result == true) {
await notifyService.cancelNotification(todo.id);
setState(() {
todo.isCompleted = !todo.isCompleted;
todo.scheduledTime = null;
todoService.updateTodo(todo);
});
setState(() {
todo.isCompleted = !todo.isCompleted;
todo.scheduledTime = null;
todoService.updateTodo(todo);
});
}
}
// 显示对话框