Hey, I am working in a non UI class [Model layer] ...
# flow
s
Hey, I am working in a non UI class [Model layer] -
Copy code
private val _program = MutableStateFlow(NwProgram())
override val program: StateFlow<NwProgram> = _program

private val stateFlowScope: CoroutineScope by lazy { CoroutineScope(Dispatchers.Default) }

override val entities: StateFlow<List<NwEntity>> = program.transform {
    emit(it.entities ?: emptyList())
}.stateIn(
    scope = stateFlowScope,
    started = WhileSubscribed(5000),
    initialValue = emptyList()
)
But during building, it got -
Copy code
e: java.lang.AssertionError: Unbound symbols not allowed

Execution failed for task ':coresdk:compileDebugKotlin'.
> Internal compiler error. See log for more details
Kotlin v1.5.0
and
coroutines v1.5.0
So, why it's happening? Can anyone help I was migrating
livedata
to
stateflow
in my Android project.