fun Modifier.task(name: String? = null, file: String? = null, line: Int? = null, action: () -> Unit): ModifierOverview
In Kotlin, a LaunchedEffect in the composable usually expresses the same thing.
Modifier.task(action = { })This is the Kotlin form of SwiftUI View.task(name:priority:file:line:_:): SwiftUI documentation. In Swift it reads:
@export(implementation) nonisolated func task(name: String? = nil, priority: TaskPriority = .userInitiated, file: String = #fileID, line: Int = #line, _ action: sending @escaping @isolated(any) () async -> Void) -> some ViewTopics
Overloads
fun Modifier.task(id: Any, name: String? = null, file: String? = null, line: Int? = null, action: () -> Unit): Modifier
fun Modifier.task(name: String? = null, file: String? = null, line: Int? = null, action: () -> Unit): Modifier