copyWith method

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

Implementation

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