copyWith method

AssetMetadata copyWith({
  1. String? assetTag,
  2. DateTime? lastInspection,
  3. DateTime? nextMaintenance,
  4. String? location,
  5. String? installedBy,
  6. DateTime? installationDate,
  7. List<FieldMeasurement>? fieldMeasurements,
})

Implementation

AssetMetadata copyWith({
  String? assetTag,
  DateTime? lastInspection,
  DateTime? nextMaintenance,
  String? location,
  String? installedBy,
  DateTime? installationDate,
  List<FieldMeasurement>? fieldMeasurements,
}) {
  return AssetMetadata(
    assetTag: assetTag ?? this.assetTag,
    lastInspection: lastInspection ?? this.lastInspection,
    nextMaintenance: nextMaintenance ?? this.nextMaintenance,
    location: location ?? this.location,
    installedBy: installedBy ?? this.installedBy,
    installationDate: installationDate ?? this.installationDate,
    fieldMeasurements: fieldMeasurements ?? this.fieldMeasurements,
  );
}