Hey everyone, I wanted to consume flow that I am e...
# touchlab-tools
t
Hey everyone, I wanted to consume flow that I am emitting from the shared view model. I am initially emitting three states Loading, Success and Error. In the success State I am passing the flow, for reference
data class Success(val data: Flow<LocalAnimeEntity>) : AnimeLocalState
. I am using
SKIE
to consume the flow (attached image of snippet). But I am getting this error log
Copy code
error: generic struct 'ForEach' requires that 'SkieSwiftFlow<LocalAnimeEntity>' conform to 'RandomAccessCollection'
                        ForEach(successState.data, id: \.id) { anime in
                        ^
SwiftUI.ForEach:2:15: note: where 'Data' = 'SkieSwiftFlow<LocalAnimeEntity>'
public struct ForEach<Data, ID, Content> where Data : RandomAccessCollection, ID : Hashable {
              ^
I tried to implement the example solution provided on the example in the docs, but is difficult to implement as I am not getting data directly. Can someone help thank you color Slack Conversation