copyWith method

BonusModel copyWith({
  1. int? id,
  2. num? amount,
  3. int? orderCount,
  4. DateTime? activeFrom,
  5. DateTime? activeTill,
  6. DateTime? createdAt,
})

Implementation

BonusModel copyWith({
  int? id,
  num? amount,
  int? orderCount,
  DateTime? activeFrom,
  DateTime? activeTill,
  DateTime? createdAt,
}) =>
    BonusModel(
      id: id ?? this.id,
      amount: amount ?? this.amount,
      orderCount: orderCount ?? this.orderCount,
      activeFrom: activeFrom ?? this.activeFrom,
      activeTill: activeTill ?? this.activeTill,
      createdAt: createdAt ?? this.createdAt,
    );