ScanDataCollection.fromMap constructor
Creates a ScanDataCollection from a Map received via the platform channel.
Implementation
factory ScanDataCollection.fromMap(Map<String, dynamic> map) {
return ScanDataCollection(
friendlyName: map['friendlyName'] as String?,
labelIdentifier: map['labelIdentifier'] as String?,
result: map['scannerResult'] != null
? ScannerResults.fromValue(map['scannerResult'] as String)
: null,
scanData: map['scanData'] != null
? List<ScanData>.from(
(map['scanData'] as List)
.map((e) => ScanData.fromMap(Map<String, dynamic>.from(e))),
)
: null,
tokenizedData: map['tokenizedData'] != null
? TokenizedData.fromMap(
Map<String, dynamic>.from(map['tokenizedData']))
: null,
);
}