feat:增加hive模块

This commit is contained in:
2025-11-07 17:21:21 +08:00
parent 0f106f6adc
commit 00e65bc5be
12 changed files with 579 additions and 43 deletions

View File

@@ -2,16 +2,16 @@ import 'package:flutter/material.dart';
import 'package:flisp_app/models/todo.dart';
class TodoProvider with ChangeNotifier {
TodoItem _formItem = TodoItem.getEmpty();
Todo _formItem = Todo.getEmpty();
TodoItem get formItem => _formItem;
Todo get formItem => _formItem;
void resetForm() {
_formItem = TodoItem.getEmpty();
_formItem = Todo.getEmpty();
notifyListeners();
}
void initForm(TodoItem todo) {
void initForm(Todo todo) {
_formItem.title = todo.title;
_formItem.content = todo.content ?? '';
_formItem.dueDate = todo.dueDate;