ScanResult.fromJson constructor

ScanResult.fromJson(
  1. Map<String, dynamic> json,
  2. ManagerForPeripheral manager
)

Implementation

factory ScanResult.fromJson(
  Map<String, dynamic?> json,
  ManagerForPeripheral manager
) {
  assert(json[_ScanResultMetadata.rssi] is int);
  return ScanResult._(
    Peripheral.fromJson(json, manager),
    json[_ScanResultMetadata.rssi],
    AdvertisementData._fromJson(json),
    isConnectable: json[_ScanResultMetadata.isConnectable],
    overflowServiceUuids: json[_ScanResultMetadata.overflowServiceUuids]
  );
}