copyWith method
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,
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,
);
}