copyWith method

SubscriptionState copyWith({
  1. BuildContext? context,
  2. bool? loader,
  3. bool? isSubscribed,
  4. bool? purchasePending,
  5. bool? isTrial,
  6. String? title,
  7. bool? isClicked,
  8. int? selectedItem,
  9. int? subscriptionType,
  10. ProductDetailsResponse? productResponse,
  11. String? subsExpiryDate,
  12. List<ProductDetails>? products,
  13. List<SubscriptionProducts>? subscriptionProducts,
  14. List<PurchaseDetails>? purchases,
  15. String? pastSubscriptionId,
  16. String? currentSubscriptionId,
  17. String? selectedProductId,
})

Implementation

SubscriptionState copyWith({
  BuildContext? context,
  bool? loader,
  bool? isSubscribed,
  bool? purchasePending,
  bool? isTrial,
  String? title,
  bool? isClicked,
  int? selectedItem,
  int? subscriptionType,
  ProductDetailsResponse? productResponse,
  String? subsExpiryDate,
  List<ProductDetails>? products,
  List<SubscriptionProducts>? subscriptionProducts,
  List<PurchaseDetails>? purchases,
  String? pastSubscriptionId,
  String? currentSubscriptionId,
  String? selectedProductId,
}) {
  return SubscriptionState(
    context: context ?? this.context,
    loader: loader ?? this.loader,
    isSubscribed: isSubscribed ?? this.isSubscribed,
    purchasePending: purchasePending ?? this.purchasePending,
    isTrial: isTrial ?? this.isTrial,
    title: title ?? this.title,
    isClicked: isClicked ?? this.isClicked,
    selectedItem: selectedItem ?? this.selectedItem,
    subscriptionType: subscriptionType ?? this.subscriptionType,
    productResponse: productResponse ?? this.productResponse,
    subsExpiryDate: subsExpiryDate ?? this.subsExpiryDate,
    products: products ?? this.products,
    subscriptionProducts: subscriptionProducts ?? this.subscriptionProducts,
    purchases: purchases ?? this.purchases,
    pastSubscriptionId: pastSubscriptionId ?? this.pastSubscriptionId,
    currentSubscriptionId: currentSubscriptionId ?? this.currentSubscriptionId,
    selectedProductId: selectedProductId ?? this.selectedProductId,
  );
}