hoc081098 / hoc081098/FlowExt

`combineAndCollect`: combine and collect flows

Open
#199 0 comments 0 reactions 0 assignees View on GitHub
documentation enhancement good first issue help wanted PRs-are-welcome
Dominant language
Kotlin
Stars
419
Forks
27
Avg merge
17m
Merged PRs (30d)
1

Description

```kotlin
public suspend fun combineAndCollect(
flow1: Flow,
flow2: Flow,
collector: suspend (a: T1, b: T2) -> Unit,
)
```

Example
```kotlin
class MyActivity : AppCompatActivity() {
fun onCreate(...) {
lifecycleScope.launch {
repeatOnLifecycle {
combineAndCollect(viewModel.uiStateFlow, xxxStateFlow) { uiState, xxx -> renderUi(uiState, xxx) }
}
}
}
}
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.