https://kotlinlang.org logo
#multiplatform
Title
# multiplatform
s

saket

09/01/2019, 8:16 PM
I know I can use Flow but this is a small side project and I'm trying to limit myself to familiar APIs.
l

louiscad

09/02/2019, 7:13 AM
Flow
official doc fits in one page, and it's basically built upon 3 base functions:
flow { ... }
(creates a cold
Flow
, lambda executed on each flow activation),
emit(element)
available from the
flow
lambda, emits an element, and `collect { e -> ... }`: collects all elements, unless the coroutine is cancelled (either from inside or outside). All other operators are build on that, and are pretty straightforward, and accompanied with doc.
2 Views