BluetoothAdvertisementData class
BLE 广播数据。
Constructors
-
BluetoothAdvertisementData({String? localName, bool includeDeviceName = false, bool includeTxPowerLevel = false, List<
String> serviceUuids = const <String>[], Map<int, List< manufacturerData = const <int, List<int>>{}, Map<int> >String, List< serviceData = const <String, List<int>>{}})int> > -
创建广播数据。
const
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- includeDeviceName → bool
-
是否包含适配器设备名,默认
false;Android 支持,iOS/macOS 忽略。final - includeTxPowerLevel → bool
-
是否包含发射功率,默认
false;Android 支持,iOS/macOS 忽略。final - localName → String?
-
广播本地名称,默认
null。final -
manufacturerData
→ Map<
int, List< int> > -
厂商数据,默认空 Map;key 为 Company ID。
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
serviceData
→ Map<
String, List< int> > -
服务数据,默认空 Map;key 为服务 UUID。
final
-
serviceUuids
→ List<
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