Created
August 4, 2019 18:50
-
-
Save felangel/b8238353421afce40fbd876c5ba77882 to your computer and use it in GitHub Desktop.
[flutter_firestore_todos] todos bloc snippet
This file contains hidden or 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
Stream<TodosState> _mapLoadTodosToState() async* { | |
_todosSubscription?.cancel(); | |
_todosSubscription = _todosRepository.todos().listen( | |
(todos) { | |
dispatch( | |
TodosUpdated(todos), | |
); | |
}, | |
); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment