copyWith method

RootState copyWith({
  1. bool? isUserLoggedIn,
  2. MerchantType? merchantType,
  3. SingleUseData? error,
  4. bool? isLoading,
  5. bool? notifications,
  6. bool? otpSent,
  7. bool? isNewUser,
  8. bool? emailOtpSent,
  9. bool? isSuccess,
  10. List<MultipleEmail>? multipleEmails,
  11. String? gender,
  12. RootScreenStep? currentStep,
  13. bool? isDevBuild,
  14. String? reqId,
  15. String? shopifyCustomerId,
  16. String? lastSubmittedPhone,
  17. String? lastSubmittedEmail,
})

Implementation

RootState copyWith({
  bool? isUserLoggedIn,
  MerchantType? merchantType,
  SingleUseData? error,
  bool? isLoading,
  bool? notifications,
  bool? otpSent,
  bool? isNewUser,
  bool? emailOtpSent,
  bool? isSuccess,
  List<MultipleEmail>? multipleEmails,
  String? gender,
  RootScreenStep? currentStep,
  bool? isDevBuild,
  String? reqId,
  String? shopifyCustomerId,
  String? lastSubmittedPhone,
  String? lastSubmittedEmail,
}) {
  return RootState(
    isUserLoggedIn: isUserLoggedIn ?? this.isUserLoggedIn,
    merchantType: merchantType ?? this.merchantType,
    error: error ?? this.error,
    isLoading: isLoading ?? this.isLoading,
    notifications: notifications ?? this.notifications,
    otpSent: otpSent ?? this.otpSent,
    isNewUser: isNewUser ?? this.isNewUser,
    emailOtpSent: emailOtpSent ?? this.emailOtpSent,
    isSuccess: isSuccess ?? this.isSuccess,
    multipleEmails: multipleEmails ?? this.multipleEmails,
    gender: gender ?? this.gender,
    currentStep: currentStep ?? this.currentStep,
    isDevBuild: isDevBuild ?? this.isDevBuild,
    reqId: reqId ?? this.reqId,
    shopifyCustomerId: shopifyCustomerId ?? this.shopifyCustomerId,
    lastSubmittedPhone: lastSubmittedPhone ?? this.lastSubmittedPhone,
    lastSubmittedEmail: lastSubmittedEmail ?? this.lastSubmittedEmail,
  );
}