ScanResult.fromMap constructor
Create ScanResult from a map (from native platform)
Implementation
factory ScanResult.fromMap(Map<String, dynamic> map) {
return ScanResult(
data: map['data'] as String? ?? '',
type: map['type'] as String?,
timestamp: map['timestamp'] != null
? DateTime.fromMillisecondsSinceEpoch(map['timestamp'] as int)
: DateTime.now(),
source: map['source'] as String?,
);
}