kotlin 扩展函数作为闭包参数
fun LiveData.captureValues(block: LiveDataValueCapture.() -> Unit) {
val capture = LiveDataValueCapture()
capture .block()
}
kotlin 扩展函数作为闭包参数
最新推荐文章于 2023-06-21 16:36:34 发布
kotlin 扩展函数作为闭包参数
fun LiveData.captureValues(block: LiveDataValueCapture.() -> Unit) {
val capture = LiveDataValueCapture()
capture .block()
}