Skip to content

Instantly share code, notes, and snippets.

@felangel
Created August 4, 2019 18:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save felangel/b8238353421afce40fbd876c5ba77882 to your computer and use it in GitHub Desktop.
Save felangel/b8238353421afce40fbd876c5ba77882 to your computer and use it in GitHub Desktop.
[flutter_firestore_todos] todos bloc snippet
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