Skip to content

Commit d912f48

Browse files
committed
feat(authentication): add option to clear cooldown end time
- Add clearCooldownEndTime parameter to copyWith method - Set cooldownEndTime to null when clearCooldownEndTime is true
1 parent 4c98e38 commit d912f48

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/authentication/bloc/authentication_state.dart

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,13 +68,15 @@ final class AuthenticationState extends Equatable {
6868
String? email,
6969
HttpException? exception,
7070
DateTime? cooldownEndTime,
71+
bool clearCooldownEndTime = false,
7172
}) {
7273
return AuthenticationState(
7374
status: status ?? this.status,
7475
user: user ?? this.user,
7576
email: email ?? this.email,
7677
exception: exception ?? this.exception,
77-
cooldownEndTime: cooldownEndTime ?? this.cooldownEndTime,
78+
cooldownEndTime:
79+
clearCooldownEndTime ? null : cooldownEndTime ?? this.cooldownEndTime,
7880
);
7981
}
8082
}

0 commit comments

Comments
 (0)