feat:更新主题色兼容
This commit is contained in:
@@ -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);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
// 显示对话框
|
||||
|
||||
Reference in New Issue
Block a user