Skip to content

BeaconData

The nearby beacons found in a monitored beacon region.

Collected by BeaconProbe for the ConnectivitySamplingPackage.BEACON measure. Each beacon appears only once, keyed by its BeaconDevice.uuid.

Inheritance
Annotations

Constructors

BeaconData.fromJson

BeaconData.fromJson(
  1. Map<String, dynamic> json
)

BeaconData.fromRegionAndBeacons

BeaconData.fromRegionAndBeacons({
  1. required String region,
  2. required List<Beacon> beacons,
})

Creates a BeaconData instance from a region and a list of beacons.

BeaconData

BeaconData({
  1. required String region,
})

Creates a BeaconData instance with the specified region.

Properties

fromJsonFunction

Function get fromJsonFunction
override

The function which can convert a JSON string to an object of this type.

jsonType

String get jsonType
override

Return the __type to be used for JSON serialization of this class. Default is runtimeType. Only specify this if you need another type.

region

String region
getter/setter pair

The unique identifier of the region that this beacon belongs to.

scanResult

List<BeaconDevice> get scanResult
set scanResult (List<BeaconDevice> devices)

The list of BeaconDevice found in a scan.

Setting it adds the devices to the existing result.

Methods

addBeaconDevice

void addBeaconDevice(
  1. BeaconDevice device
)

Adds device, replacing any device with the same UUID.

addBeaconDevicesFromRangingResults

void addBeaconDevicesFromRangingResults(
  1. RangingResult result
)

Sets region and adds all beacons from a beacon plugin RangingResult.

toJson

Map<String, dynamic> toJson()
override

Return a JSON encoding of this object.

toString

String toString()
override

A string representation of this object.

Some classes have a default textual representation, often paired with a static parse function (like int.parse). These classes will provide the textual representation as their string representation.

Other classes have no meaningful textual representation that a program will care about. Such classes will typically override toString to provide useful information when inspecting the object, mainly for debugging or logging.