Skip to content

Instantly share code, notes, and snippets.

@manuelvicnt
Last active May 10, 2021 13:38
Show Gist options
  • Save manuelvicnt/be5b7798b50222a8af79311b5fff9fc2 to your computer and use it in GitHub Desktop.
Save manuelvicnt/be5b7798b50222a8af79311b5fff9fc2 to your computer and use it in GitHub Desktop.
class LocationRepository(
private val locationDataSource: LocationDataSource,
private val externalScope: CoroutineScope
) {
val locations: Flow<Location> =
locationDataSource.locationsSource.stateIn(externalScope, WhileSubscribed(), EmptyLocation)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment