feat:增加统计模块年份选择功能
This commit is contained in:
@@ -19,6 +19,13 @@ class TodoService {
|
||||
return box.values.toList();
|
||||
}
|
||||
|
||||
List<Todo> getAllTodosByYear(int year) {
|
||||
return box.values
|
||||
.toList()
|
||||
.where((todo) => todo.createTime.year == year)
|
||||
.toList();
|
||||
}
|
||||
|
||||
Future<bool> updateTodo(Todo todo) async {
|
||||
try {
|
||||
await todo.save();
|
||||
|
||||
Reference in New Issue
Block a user