copyWith method

Chain copyWith({
  1. String? chainId,
  2. String? firmId,
  3. String? name,
  4. List<BoutiqueMongo>? boutiques,
  5. Timestamp? creationDateUTC,
  6. Timestamp? lastUpdateTimestampUTC,
  7. String? lastUpdatedByuserId,
})

Creates a copy of the chain with updated fields

Implementation

Chain copyWith({
  String? chainId,
  String? firmId,
  String? name,
  List<BoutiqueMongo>? boutiques,
  Timestamp? creationDateUTC,
  Timestamp? lastUpdateTimestampUTC,
  String? lastUpdatedByuserId,
}) {
  return Chain()
    ..chainId = chainId ?? this.chainId
    ..firmId = firmId ?? this.firmId
    ..name = name ?? this.name
    ..boutiques.addAll(boutiques ?? this.boutiques)
    ..creationDateUTC = creationDateUTC ?? this.creationDateUTC
    ..lastUpdateTimestampUTC = lastUpdateTimestampUTC ?? this.lastUpdateTimestampUTC
    ..lastUpdatedByuserId = lastUpdatedByuserId ?? this.lastUpdatedByuserId;
}