* feat: 调整插件接口

* feat: 增加 `Logger` 类

* fix: 部分参数改为可选参数

* fix: 调整接口

* fix: 重命名 AdvertiseData 为 Advertisement

* fix: 移除 `Logger.level` 属性

* fix: 适配 4.0.0

* fix: 更新依赖项

* fix: 优化导入方式

* fix: 修改版本号

* fix: 适配 4.0.0

* feat: 部分适配 4.0.0

* feat: 适配 4.0.0

* feat: 适配 4.0.0

* fix: 调整接口

* feat: 调整日志接口

* fix: 修复日志错误

* fix: 临时提交

* draft: 临时提交

* fix: 使用 log_service 插件替换 logging 插件

* fix: 更新 log_service 版本

* fix: 4.0.0

* feat: 4.0.0

* feat: 4.0.0
This commit is contained in:
iAMD
2023-10-30 18:06:14 +08:00
committed by GitHub
parent 3c10caa5dd
commit cfe0eda4a3
68 changed files with 1316 additions and 814 deletions

View File

@ -307,7 +307,7 @@ class MyCentralManager: MyCentralManagerHostApi {
setUpCompletion!(.success(args))
setUpCompletion = nil
}
api.onStateChanged(stateNumberArgs: stateNumberArgs) {}
api.onStateChanged(stateNumberArgs: stateNumberArgs) {_ in }
}
func didDiscover(_ peripheral: CBPeripheral, _ advertisementData: [String : Any], _ rssi: NSNumber) {
@ -318,8 +318,8 @@ class MyCentralManager: MyCentralManagerHostApi {
peripherals[peripheralHashCodeArgs] = peripheral
peripheralsArgs[peripheralHashCode] = peripheralArgs
let rssiArgs = rssi.int64Value
let advertiseDataArgs = advertisementData.toAdvertiseDataArgs()
api.onDiscovered(peripheralArgs: peripheralArgs, rssiArgs: rssiArgs, advertiseDataArgs: advertiseDataArgs) {}
let advertisementArgs = advertisementData.toAdvertisementArgs()
api.onDiscovered(peripheralArgs: peripheralArgs, rssiArgs: rssiArgs, advertisementArgs: advertisementArgs) {_ in }
}
func didConnect(_ peripheral: CBPeripheral) {
@ -329,7 +329,7 @@ class MyCentralManager: MyCentralManagerHostApi {
}
let peripheralHashCodeArgs = peripheralArgs.hashCodeArgs
let stateArgs = true
api.onPeripheralStateChanged(peripheralArgs: peripheralArgs, stateArgs: stateArgs) {}
api.onPeripheralStateChanged(peripheralArgs: peripheralArgs, stateArgs: stateArgs) {_ in }
guard let completion = connectCompletions.removeValue(forKey: peripheralHashCodeArgs) else {
return
}
@ -390,7 +390,7 @@ class MyCentralManager: MyCentralManagerHostApi {
}
}
let stateArgs = false
api.onPeripheralStateChanged(peripheralArgs: peripheralArgs, stateArgs: stateArgs) {}
api.onPeripheralStateChanged(peripheralArgs: peripheralArgs, stateArgs: stateArgs) {_ in }
guard let completion = disconnectCompletions.removeValue(forKey: peripheralHashCodeArgs) else {
return
}
@ -550,7 +550,7 @@ class MyCentralManager: MyCentralManagerHostApi {
guard let completion = readCharacteristicCompletions.removeValue(forKey: characteristicHashCodeArgs) else {
let value = characteristic.value ?? Data()
let valueArgs = FlutterStandardTypedData(bytes: value)
api.onCharacteristicValueChanged(characteristicArgs: characteristicArgs, valueArgs: valueArgs) {}
api.onCharacteristicValueChanged(characteristicArgs: characteristicArgs, valueArgs: valueArgs) {_ in }
return
}
if error == nil {