copyWith method
CognitoAuthConfig
copyWith({
- CognitoOAuthConfig? oAuth,
- AuthenticationFlowType? authenticationFlowType,
- List<
SocialProvider> ? socialProviders, - List<
CognitoUserAttributeKey> ? loginMechanism, - List<
CognitoUserAttributeKey> ? loginMechanisms, - List<
CognitoUserAttributeKey> ? usernameAttributes, - List<
CognitoUserAttributeKey> ? signupAttributes, - PasswordProtectionSettings? passwordProtectionSettings,
- MfaConfiguration? mfaConfiguration,
- List<
MfaType> ? mfaTypes, - List<
CognitoUserAttributeKey> ? verificationMechanisms,
Implementation
CognitoAuthConfig copyWith({
CognitoOAuthConfig? oAuth,
AuthenticationFlowType? authenticationFlowType,
List<SocialProvider>? socialProviders,
List<CognitoUserAttributeKey>? loginMechanism,
List<CognitoUserAttributeKey>? loginMechanisms,
List<CognitoUserAttributeKey>? usernameAttributes,
List<CognitoUserAttributeKey>? signupAttributes,
PasswordProtectionSettings? passwordProtectionSettings,
MfaConfiguration? mfaConfiguration,
List<MfaType>? mfaTypes,
List<CognitoUserAttributeKey>? verificationMechanisms,
}) {
return CognitoAuthConfig(
oAuth: oAuth ?? this.oAuth,
authenticationFlowType:
authenticationFlowType ?? this.authenticationFlowType,
socialProviders: socialProviders ??
(this.socialProviders == null
? null
: List.of(this.socialProviders!)),
loginMechanism: loginMechanism ??
(this.loginMechanism == null ? null : List.of(this.loginMechanism!)),
loginMechanisms: loginMechanisms ??
(this.loginMechanisms == null
? null
: List.of(this.loginMechanisms!)),
usernameAttributes: usernameAttributes ??
(this.usernameAttributes == null
? null
: List.of(this.usernameAttributes!)),
signupAttributes: signupAttributes ??
(this.signupAttributes == null
? null
: List.of(this.signupAttributes!)),
passwordProtectionSettings:
passwordProtectionSettings ?? this.passwordProtectionSettings,
mfaConfiguration: mfaConfiguration ?? this.mfaConfiguration,
mfaTypes:
mfaTypes ?? (this.mfaTypes == null ? null : List.of(this.mfaTypes!)),
verificationMechanisms: verificationMechanisms ??
(this.verificationMechanisms == null
? null
: List.of(this.verificationMechanisms!)),
);
}