copyWith method

CompanyData copyWith({
  1. int? id,
  2. Value<int?> companyIdParent = const Value.absent(),
  3. String? code,
  4. String? name,
  5. Value<String?> imagePath = const Value.absent(),
  6. Value<String?> description = const Value.absent(),
})

Implementation

CompanyData copyWith({
  int? id,
  Value<int?> companyIdParent = const Value.absent(),
  String? code,
  String? name,
  Value<String?> imagePath = const Value.absent(),
  Value<String?> description = const Value.absent(),
}) => CompanyData(
  id: id ?? this.id,
  companyIdParent: companyIdParent.present
      ? companyIdParent.value
      : this.companyIdParent,
  code: code ?? this.code,
  name: name ?? this.name,
  imagePath: imagePath.present ? imagePath.value : this.imagePath,
  description: description.present ? description.value : this.description,
);