BluetoothGattService class
GATT 服务。
Constructors
-
BluetoothGattService({required String uuid, bool isPrimary = true, List<
BluetoothGattCharacteristic> characteristics = const <BluetoothGattCharacteristic>[], List<String> includedServices = const <String>[], Map<String, dynamic> raw = const <String, dynamic>{}}) -
创建 GATT 服务。
const
-
BluetoothGattService.fromMap(Map<
String, dynamic> map) -
从原生 Map 创建 GATT 服务。
factory
Properties
-
characteristics
→ List<
BluetoothGattCharacteristic> -
特征列表,默认空列表。
final
- hashCode → int
-
The hash code for this object.
no setterinherited
-
includedServices
→ List<
String> -
包含服务 UUID 列表,默认空列表。
final
- isPrimary → bool
-
是否主服务,默认
true。final -
raw
→ Map<
String, dynamic> -
原生完整字段,默认空 Map。
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- uuid → String
-
服务 UUID。
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