kotlin-tutorials
kotlin-tutorials copied to clipboard
Flow is intended to return a single value that changes over time, not as a replacement of list.
The Kotlin Flow concept is intended to return a reference that notifies observers of changes to its value (which may be a list/collection) but here it is used as a replacement for list. It will kind of work but the way to return a list as flow is Flow<List<T>>
.
I assume this is the article - https://www.baeldung.com/kotlin/flow-intro - you're referring to? Any particular code example/section that is misleading in your opinion? We'll be happy to take a look into this.