报错 'async' call in a function that does not support concurrency

给 Polar 设置时间时,因为是异步函数,不能直接调用。

异步函数的调用方式是:

1
2
3
4
5
6
7
8
9
Button{aciton: {
Task { // Add Here
await bleSdkManager.setTime()
}
}, label: {
Text("Calibration Time")
.font(.system(size: 14.0, weight: .black, design: .monospaced))
.foregroundColor(.blue)
})

报错 'async' call in a function that does not support concurrency
https://wonderhoi.com/2024/01/18/报错-async-call-in-a-function-that-does-not-support-concurrency/
作者
wonderhoi
发布于
2024年1月18日
许可协议