janvladimirmostert
Jan
Carter
@file:DependsOn("org.jetbrains.kotlinx:kotlinx-datetime:0.3.2") %useLatestDescriptors %use lets-plot import java.util.Random import kotlinx.datetime.Instant
Line_214.jupyter-kts (6:25 - 32) Unresolved reference: Instant
AG
IllegalStateException Flow invariant is violated emission from another coroutine is detected
flow<Action> { val result = downloadFile(url, directory) { event: ProgressEvent -> emit(DownloadProgress(event)) } emit(DownloadFinished("path")) }.onEach { L.d(it) }.launchIn(viewLifecycleOwner.lifecycleScope)
suspend fun downloadFile( url: String, fileDir: String, onProgressEvent: suspend (event: ProgressEvent) -> Unit = {}) { val progressChannel = Channel<ProgressEvent>() CoroutineScope(coroutineContext).launch { progressChannel.consumeAsFlow().collect { onProgressEvent.invoke(it) } } /* rest of the code */ }
Ahmed Riyadh
electrolobzik
Bradleycorn
ClickableText
onClick = { pos -> if (pos in linkStart..linkEnd) { onLoginClicked() } }
performClick()
performTouchInput()
Rick Regan
LazyColumn
itemsIndexed
Modifier.animateItemPlacement()
theapache64
layoutCoordinates.positionInRoot()
Fatal Exception: java.lang.IllegalStateException LayoutCoordinate operations are only valid when isAttached is true
A modern programming language that makes developers happier.