copyWith method

MultiFactorAuthState copyWith({
  1. bool? loading,
  2. Object? error = _sentinel,
  3. Object? settings = _sentinel,
  4. Object? appset = _sentinel,
  5. AuthMode? authMode,
  6. Object? accountProvider = _sentinel,
  7. Object? scanProvider = _sentinel,
  8. bool? agreed,
  9. bool? obscurePassword,
  10. bool? submitting,
  11. bool? challengeLoading,
  12. bool? submitDragging,
  13. double? submitProgress,
  14. String? username,
  15. String? password,
  16. String? code,
  17. Object? challengeToken = _sentinel,
})

Implementation

MultiFactorAuthState copyWith({
  bool? loading,
  Object? error = _sentinel,
  Object? settings = _sentinel,
  Object? appset = _sentinel,
  AuthMode? authMode,
  Object? accountProvider = _sentinel,
  Object? scanProvider = _sentinel,
  bool? agreed,
  bool? obscurePassword,
  bool? submitting,
  bool? challengeLoading,
  bool? submitDragging,
  double? submitProgress,
  String? username,
  String? password,
  String? code,
  Object? challengeToken = _sentinel,
}) {
  return MultiFactorAuthState(
    loading: loading ?? this.loading,
    error: identical(error, _sentinel) ? this.error : error,
    settings: identical(settings, _sentinel)
        ? this.settings
        : settings as Settings?,
    appset: identical(appset, _sentinel) ? this.appset : appset as String?,
    authMode: authMode ?? this.authMode,
    accountProvider: identical(accountProvider, _sentinel)
        ? this.accountProvider
        : accountProvider as AccountProvider,
    scanProvider: identical(scanProvider, _sentinel)
        ? this.scanProvider
        : scanProvider as ScanProvider?,
    agreed: agreed ?? this.agreed,
    obscurePassword: obscurePassword ?? this.obscurePassword,
    submitting: submitting ?? this.submitting,
    challengeLoading: challengeLoading ?? this.challengeLoading,
    submitDragging: submitDragging ?? this.submitDragging,
    submitProgress: submitProgress ?? this.submitProgress,
    username: username ?? this.username,
    password: password ?? this.password,
    code: code ?? this.code,
    challengeToken: identical(challengeToken, _sentinel)
        ? this.challengeToken
        : challengeToken as String?,
  );
}