Created
June 14, 2022 09:23
-
-
Save FlutterWiz/3903bae6bc0ae7ad09d0db1453c4e584 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:freezed_annotation/freezed_annotation.dart'; | |
import 'package:todo_list_riverpod/domain/todo_model.dart'; | |
part 'todo_state.freezed.dart'; | |
@freezed | |
class TodoState with _$TodoState { | |
factory TodoState({ | |
required List<TodoModel> todoList, | |
required TodoModel todo, | |
}) = _TodoState; | |
const TodoState._(); | |
factory TodoState.empty() => TodoState( | |
todoList: [], | |
todo: TodoModel.empty(), | |
); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment