Last active
July 14, 2020 16:52
-
-
Save Cheersupzoo/5a276ab6d08f41ab06e7abf03094d975 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 TodosState extends Equatable { | |
TodosState([List props = const []]) : super(); | |
@override | |
List<Object> get props => []; | |
} | |
class TodosLoading extends TodosState { | |
@override | |
String toString() => 'TodosLoading'; | |
} | |
class TodosLoaded extends TodosState { | |
final List<TodoModel> todos; | |
TodosLoaded([this.todos = const []]) : super([todos]); | |
@override | |
String toString() { | |
return 'TodosLoaded { todos : $todos }'; | |
} | |
@override | |
List<Object> get props => [todos]; | |
} | |
class TodosNotLoaded extends TodosState { | |
@override | |
String toString() => 'TodosNotLoaded'; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment