copyWith method

LinkFiveActiveProducts copyWith({
  1. List<LinkFivePlan>? planList,
  2. List<LinkFiveOneTimePurchase>? oneTimePurchaseList,
})

Simple & handy copy with method

Implementation

LinkFiveActiveProducts copyWith({
  List<LinkFivePlan>? planList,
  List<LinkFiveOneTimePurchase>? oneTimePurchaseList,
}) {
  return LinkFiveActiveProducts._(
      planList: switch (planList) { null => this?.planList ?? [], _ => planList },
      oneTimePurchaseList: switch (oneTimePurchaseList) {
        null => this?.oneTimePurchaseList ?? [],
        _ => oneTimePurchaseList
      });
}