Created
April 16, 2018 16:16
-
-
Save xrigau/202630bd1a996a330c281f76ce9406ab to your computer and use it in GitHub Desktop.
Introduction to Redux in Flutter (state.dart)
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
class AppState { | |
final List<ToDoItem> toDos; | |
final ListState listState; | |
AppState(this.toDos, this.listState); | |
factory AppState.initial() => AppState(List.unmodifiable([]), ListState.listOnly); | |
} | |
enum ListState { | |
listOnly, listWithNewItem | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment