feat: 支持获取 maximumWrtieLength (#14)
This commit is contained in:
@ -1,20 +1,24 @@
|
||||
## 2.2.0
|
||||
|
||||
* Add `CentralController#getMaximumWriteLength` method.
|
||||
|
||||
## 2.0.3
|
||||
|
||||
- `Android` Migrate to Android 13.
|
||||
- `Android` Fix the issuce that receive wrong values caused by unsafe memory, see https://developer.android.com/reference/android/bluetooth/BluetoothGattCallback#onCharacteristicChanged(android.bluetooth.BluetoothGatt,%20android.bluetooth.BluetoothGattCharacteristic)
|
||||
* `Android` Migrate to Android 13.
|
||||
* `Android` Fix the issuce that receive wrong values caused by unsafe memory, see https://developer.android.com/reference/android/bluetooth/BluetoothGattCallback#onCharacteristicChanged(android.bluetooth.BluetoothGatt,%20android.bluetooth.BluetoothGattCharacteristic)
|
||||
|
||||
## 2.0.2
|
||||
|
||||
- Combine iOS and macOS projects.
|
||||
- Optimize project structure.
|
||||
* Combine iOS and macOS projects.
|
||||
* Optimize project structure.
|
||||
|
||||
## 2.0.1
|
||||
|
||||
- Fix the issue that GATTs is cleared after peripheral disconnected on iOS and macOS.
|
||||
- Fix the issue that create UUID form peripheral's address failed on Linux.
|
||||
- Fix the issue that instance match failed on Linux.
|
||||
* Fix the issue that GATTs is cleared after peripheral disconnected on iOS and macOS.
|
||||
* Fix the issue that create UUID form peripheral's address failed on Linux.
|
||||
* Fix the issue that instance match failed on Linux.
|
||||
|
||||
## 2.0.0
|
||||
|
||||
- Rewrite the whole project with federated plugins.
|
||||
- Support macOS and Linux.
|
||||
* Rewrite the whole project with federated plugins.
|
||||
* Support macOS and Linux.
|
||||
|
@ -163,6 +163,15 @@ class MyCentralController extends CentralController {
|
||||
await device.disconnect();
|
||||
}
|
||||
|
||||
@override
|
||||
Future<int> getMaximumWriteLength(
|
||||
Peripheral peripheral, {
|
||||
required GattCharacteristicWriteType type,
|
||||
}) async {
|
||||
// TODO: 当前版本 `bluez` 插件不支持获取 MTU,返回最小值 20.
|
||||
return 20;
|
||||
}
|
||||
|
||||
@override
|
||||
Future<void> discoverGATT(Peripheral peripheral) async {
|
||||
await _throwWithoutState(CentralState.poweredOn);
|
||||
|
@ -1,6 +1,6 @@
|
||||
name: bluetooth_low_energy_linux
|
||||
description: Linux implementation of the bluetooth_low_energy plugin.
|
||||
version: 2.0.3
|
||||
version: 2.2.0
|
||||
homepage: https://github.com/yanshouwang/bluetooth_low_energy
|
||||
|
||||
environment:
|
||||
@ -10,7 +10,7 @@ environment:
|
||||
dependencies:
|
||||
flutter:
|
||||
sdk: flutter
|
||||
bluetooth_low_energy_platform_interface: ^2.0.3
|
||||
bluetooth_low_energy_platform_interface: ^2.2.0
|
||||
bluez: ^0.8.1
|
||||
|
||||
dev_dependencies:
|
||||
|
Reference in New Issue
Block a user