Future<void> addTask(String title) async { final newTask = Task(title: title); state = [...state, newTask]; await _saveTasks(); }