Skip to content

Instantly share code, notes, and snippets.

@manuelvicnt
Created May 3, 2021 12:08
Show Gist options
  • Select an option

  • Save manuelvicnt/6f14fd66dd000d2e76fcbc4695cd836a to your computer and use it in GitHub Desktop.

Select an option

Save manuelvicnt/6f14fd66dd000d2e76fcbc4695cd836a 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.shareIn(externalScope, WhileSubscribed())
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment