toJson property
dynamic
toJson
Serialize current instance object into Map.
Implementation
dynamic get toJson {
final map = <String, dynamic>{
'proximityUUID': proximityUUID,
'major': major,
'minor': minor,
'rssi': rssi,
'accuracy': accuracy,
'proximity': proximity.toString().split('.').last
};
if (txPower != null) {
map['txPower'] = txPower;
}
if (macAddress != null) {
map['macAddress'] = macAddress;
}
return map;
}