Skip to content

Instantly share code, notes, and snippets.

@FlutterWiz
Created June 14, 2022 09:23
Show Gist options
  • Save FlutterWiz/3903bae6bc0ae7ad09d0db1453c4e584 to your computer and use it in GitHub Desktop.
Save FlutterWiz/3903bae6bc0ae7ad09d0db1453c4e584 to your computer and use it in GitHub Desktop.
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