daveDaDude
daveDaDude

Reputation: 1

Flowable<List<T>> to List<T>

I want to convert a FlowableList to a List. Any suggestions?

private val flowableList: Flowable<List<T>>
private val list = listOf<T>(flowableList)

Upvotes: 0

Views: 400

Answers (1)

Andrei Tanana
Andrei Tanana

Reputation: 8442

Just use toList method

val list = flowableList.toList().map { it.flatten() }

Upvotes: 2

Related Questions