copyWith method

Item copyWith({
  1. String? name,
  2. int? pricePerUnit,
  3. int? quantity,
  4. int? weight,
  5. int? height,
  6. int? width,
  7. int? length,
})

Implementation

Item copyWith({
  String? name,
  int? pricePerUnit,
  int? quantity,
  int? weight,
  int? height,
  int? width,
  int? length,
}) =>
    Item(
      name: name ?? this.name,
      pricePerUnit: pricePerUnit ?? this.pricePerUnit,
      quantity: quantity ?? this.quantity,
      weight: weight ?? this.weight,
      height: height ?? this.height,
      width: width ?? this.width,
      length: length ?? this.length,
    );