Last active
July 14, 2020 16:53
-
-
Save Cheersupzoo/398bff13ed7ce3aa9a7da71b244afd91 to your computer and use it in GitHub Desktop.
This file contains 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:equatable/equatable.dart'; | |
import 'package:meta/meta.dart'; | |
import 'package:simple_todos_bloc/models/models.dart'; | |
@immutable | |
abstract class TodosEvent extends Equatable { | |
TodosEvent([List props = const <dynamic>[]]) : super(); | |
@override | |
List<Object> get props => []; | |
} | |
class LoadTodos extends TodosEvent { | |
@override | |
String toString() { | |
return 'LoadTodos'; | |
} | |
} | |
class AddTodos extends TodosEvent { | |
final TodoModel todo; | |
AddTodos(this.todo) : super([todo]); | |
@override | |
String toString() => 'AddTodos { todo: $todo }'; | |
} | |
class UpdateTodos extends TodosEvent { | |
final TodoModel updateTodo; | |
UpdateTodos(this.updateTodo) : super([updateTodo]); | |
@override | |
String toString() => 'UpdateTodos { updateTodo: $updateTodo }'; | |
} | |
class DeleteTodos extends TodosEvent { | |
final TodoModel deleteTodo; | |
DeleteTodos(this.deleteTodo) : super([deleteTodo]); | |
@override | |
String toString() => 'DeleteTodos { deleteTodo: $deleteTodo }'; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment