copyWith method
IdentityState
copyWith({
- Set<
LoadingState> ? loadingStates, - Set<
Message> ? messages, - Session? session,
- bool? isLoggedIn,
- User? user,
- String? accessToken,
- Verification? awaitingVerification,
- dynamic resetAwaitingVerification = false,
- AuthType? awaitingLogin,
- dynamic resetAwaitingLogin = false,
- String? totpSetupSecret,
- Uri? totpSetupUri,
- dynamic resetTOTPSetup = false,
override
The concrete class must implement this method to return a new instance of the state with the given parameters.
Implementation
@override
IdentityState copyWith({
Set<LoadingState>? loadingStates,
Set<Message>? messages,
Session? session,
bool? isLoggedIn,
User? user,
String? accessToken,
Verification? awaitingVerification,
resetAwaitingVerification = false,
AuthType? awaitingLogin,
resetAwaitingLogin = false,
String? totpSetupSecret,
Uri? totpSetupUri,
resetTOTPSetup = false,
}) {
return IdentityState(
loadingStates: loadingStates ?? super.loadingStates,
messages: messages ?? super.messages,
session: session ?? this.session,
isLoggedIn: isLoggedIn ?? this.isLoggedIn,
user: user ?? this.user,
accessToken: accessToken ?? this.accessToken,
awaitingVerification: //
resetAwaitingVerification //
? null
: awaitingVerification ?? this.awaitingVerification,
awaitingLogin: //
resetAwaitingLogin //
? null
: awaitingLogin ?? this.awaitingLogin,
totpSetupSecret: //
resetTOTPSetup //
? null
: totpSetupSecret ?? this.totpSetupSecret,
totpSetupUri: //
resetTOTPSetup //
? null
: totpSetupUri ?? this.totpSetupUri,
);
}