RfidTag.fromMap constructor

RfidTag.fromMap(
  1. Map<String, dynamic> map
)

Implementation

factory RfidTag.fromMap(Map<String, dynamic> map) {
  return RfidTag(
    epc: map['epc'] ?? '',
    antenna: map['antenna']?.toInt() ?? 0,
    rssi: map['rssi']?.toInt() ?? 0,
    distance: map['distance']?.toInt() ?? 0,
    memoryBankData: map['memoryBankData'] ?? '',
    lockData: map['lockData'] ?? '',
    size: map['size']?.toInt() ?? 0,
    seen: map['seen'] ?? '',
    interface:
        toEnum(map['eventSource'], Interfaces.values) ?? Interfaces.unknown,
  );
}