BluetoothGattCharacteristic class
GATT 特征。
Constructors
-
BluetoothGattCharacteristic({required String uuid, required String serviceUuid, List<
String> properties = const <String>[], List<String> permissions = const <String>[], List<int> value = const <int>[], List<BluetoothGattDescriptor> descriptors = const <BluetoothGattDescriptor>[], Map<String, dynamic> raw = const <String, dynamic>{}}) -
创建 GATT 特征。
const
-
BluetoothGattCharacteristic.fromMap(Map<
String, dynamic> map) -
从原生 Map 创建 GATT 特征。
factory
Properties
- canIndicate → bool
-
是否支持指示。
no setter
- canNotify → bool
-
是否支持通知。
no setter
- canRead → bool
-
是否支持读取。
no setter
- canWrite → bool
-
是否支持有响应写。
no setter
- canWriteWithoutResponse → bool
-
是否支持无响应写。
no setter
-
descriptors
→ List<
BluetoothGattDescriptor> -
描述符列表,默认空列表。
final
- hashCode → int
-
The hash code for this object.
no setterinherited
-
permissions
→ List<
String> -
本地 GATT Server 权限列表,默认空列表。
final
-
properties
→ List<
String> -
特征属性列表,默认空列表。
final
-
raw
→ Map<
String, dynamic> -
原生完整字段,默认空 Map。
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- serviceUuid → String
-
所属服务 UUID。
final
- uuid → String
-
特征 UUID。
final
-
value
→ List<
int> -
特征值,默认空字节数组。
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toMap(
) → Map< String, dynamic> - 转为可传给原生端的 Map。
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited