Skip to content

Instantly share code, notes, and snippets.

@fergusonm
Created December 22, 2021 16: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 fergusonm/572b510f3c39f8d62b1557a01e4ce52a to your computer and use it in GitHub Desktop.
Save fergusonm/572b510f3c39f8d62b1557a01e4ce52a to your computer and use it in GitHub Desktop.
Event emitter
// In your view model
private val _eventChannel = Channel<Event>(Channel.BUFFERED)
val events = _eventChannel.receiveAsFlow()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment