Barcode.fromMap constructor

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

create a barcode from a map

Implementation

factory Barcode.fromMap(Map<String, dynamic> map) {
  return Barcode(
    barcode: map['barcode'] ?? '',
    format: map['format'] ?? '',
    seen: map['seen'] ?? '',
    interface:
        toEnum(map['eventSource'], Interfaces.values) ?? Interfaces.unknown,
  );
}