Skip to content

Commit

Permalink
refactor: rename UserFailure.none to UserFailure.empty
Browse files Browse the repository at this point in the history
  • Loading branch information
narcodico committed Apr 2, 2024
1 parent 820b44c commit d49f420
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion lib/app/cubit/app_state.dart
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ final class AppState extends Equatable {
const AppState._({
required this.status,
this.user = User.none,
this.failure = UserFailure.none,
this.failure = UserFailure.empty,
});

const AppState.unauthenticated() : this._(status: AppStatus.unauthenticated);
Expand Down
2 changes: 1 addition & 1 deletion lib/login/cubit/login_state.dart
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ final class LoginState extends Equatable {
const LoginState._({
this.status = LoginStatus.initial,
this.signInMethod = SignInMethod.none,
this.failure = UserFailure.none,
this.failure = UserFailure.empty,
});

const LoginState.initial() : this._();
Expand Down
6 changes: 3 additions & 3 deletions packages/user_repository/lib/src/failures.dart
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ class UserFailure extends Failure {
factory UserFailure.fromSignInWithAppleNotSupported() =>
const AppleSignInNotSupportedFailure();

static const none = UserNoFailure();
static const empty = EmptyUserFailure();
}

class UserNoFailure extends UserFailure {
const UserNoFailure() : super._();
class EmptyUserFailure extends UserFailure {
const EmptyUserFailure() : super._();
}

class AuthUserChangesFailure extends UserFailure {
Expand Down

0 comments on commit d49f420

Please sign in to comment.