Skip to content

Instantly share code, notes, and snippets.

@FlutterWiz
Created June 14, 2022 09:25
Show Gist options
  • Save FlutterWiz/c80eb26c0b66ac7e7848668bd2175b77 to your computer and use it in GitHub Desktop.
Save FlutterWiz/c80eb26c0b66ac7e7848668bd2175b77 to your computer and use it in GitHub Desktop.
import 'package:freezed_annotation/freezed_annotation.dart';
part 'todo_event.freezed.dart';
@freezed
class TodoEvent with _$TodoEvent {
const factory TodoEvent.todoTitleChanged({required String text}) = TodoTitleChanged;
const factory TodoEvent.todoStatusChanged({required String todoId}) = TodoStatusChanged;
const factory TodoEvent.addTodo() = AddTodo;
const factory TodoEvent.removeTodo({required String todoId}) = RemoveTodo;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment