copyWith method

ScanResult copyWith({
  1. String? data,
  2. String? type,
  3. DateTime? timestamp,
  4. String? source,
})

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,
  );
}