copyWith method
Returns a copy of this ScanResult with the given fields replaced.
Implementation
ScanResult copyWith({
String? data,
String? type,
DateTime? timestamp,
String? source,
}) {
return ScanResult(
data: data ?? this.data,
type: type ?? this.type,
timestamp: timestamp ?? this.timestamp,
source: source ?? this.source,
);
}