copyWith method

CognitoAuthConfig copyWith({
  1. CognitoOAuthConfig? oAuth,
  2. AuthenticationFlowType? authenticationFlowType,
  3. List<SocialProvider>? socialProviders,
  4. List<CognitoUserAttributeKey>? loginMechanism,
  5. List<CognitoUserAttributeKey>? loginMechanisms,
  6. List<CognitoUserAttributeKey>? usernameAttributes,
  7. List<CognitoUserAttributeKey>? signupAttributes,
  8. PasswordProtectionSettings? passwordProtectionSettings,
  9. MfaConfiguration? mfaConfiguration,
  10. List<MfaType>? mfaTypes,
  11. 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!)),
  );
}