-
Notifications
You must be signed in to change notification settings - Fork 12
Migrate to basic models from freezed #372
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
wizlif
wants to merge
9
commits into
CollActionteam:development
Choose a base branch
from
wizlif:ft/370/migrate-to-basic-models-from-freezed
base: development
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
cf9b0b0
fix: add manual logging to auth repo
Xazin 649893f
Merge pull request #371 from CollActionteam/fix/manual-logging-auth-repo
Xazin 023d67e
chore: upgrade gradle build tools and dependencies
Xazin ede0ca6
core(domain): Migrate freezed to equatable orr plain classes
wizlif 783b26e
core(application): Migrate freezed to equatable orr plain classes
wizlif dc6a058
core(infrastructure): Migrate dtos
wizlif be14fe2
core(presentation): Refactor to match application
wizlif 8b9cd42
test: Migrate tests
wizlif 7e0deee
fix: Refactors
wizlif File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,5 @@ | ||
#Fri Jun 23 08:50:38 CEST 2017 | ||
distributionBase=GRADLE_USER_HOME | ||
distributionPath=wrapper/dists | ||
zipStoreBase=GRADLE_USER_HOME | ||
zipStorePath=wrapper/dists | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-6.7.1-all.zip | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-all.zip |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,14 @@ | ||
part of 'auth_bloc.dart'; | ||
|
||
@freezed | ||
class AuthEvent with _$AuthEvent { | ||
abstract class AuthEvent extends Equatable { | ||
const AuthEvent(); | ||
|
||
const factory AuthEvent.initial() = _InitialEvent; | ||
|
||
const factory AuthEvent.verifyPhone(String phoneNumber) = _VerifyPhone; | ||
|
||
const factory AuthEvent.updated( | ||
Either<AuthFailure, AuthSuccess> failureOrCredential, | ||
Either<AuthFailure, $auth_success.AuthSuccess> failureOrCredential, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why can't it just be AuthSuccess |
||
) = _Updated; | ||
|
||
const factory AuthEvent.signInWithPhone(String smsCode) = _SignInWithPhone; | ||
|
@@ -23,4 +24,65 @@ class AuthEvent with _$AuthEvent { | |
|
||
/// Sign out | ||
const factory AuthEvent.signedOut() = _SignedOut; | ||
|
||
@override | ||
List<Object?> get props => []; | ||
} | ||
|
||
class _InitialEvent extends AuthEvent { | ||
const _InitialEvent(); | ||
} | ||
|
||
class _VerifyPhone extends AuthEvent { | ||
final String phoneNumber; | ||
|
||
const _VerifyPhone(this.phoneNumber); | ||
|
||
@override | ||
List<Object?> get props => [phoneNumber]; | ||
} | ||
|
||
class _Updated extends AuthEvent { | ||
final Either<AuthFailure, $auth_success.AuthSuccess> failureOrCredential; | ||
|
||
const _Updated(this.failureOrCredential); | ||
|
||
@override | ||
List<Object?> get props => [failureOrCredential]; | ||
} | ||
|
||
class _SignInWithPhone extends AuthEvent { | ||
final String smsCode; | ||
|
||
const _SignInWithPhone(this.smsCode); | ||
|
||
@override | ||
List<Object?> get props => [smsCode]; | ||
} | ||
|
||
class _ResendCode extends AuthEvent { | ||
const _ResendCode(); | ||
} | ||
|
||
class _UpdateProfilePhoto extends AuthEvent { | ||
final File photo; | ||
|
||
const _UpdateProfilePhoto(this.photo); | ||
|
||
@override | ||
List<Object?> get props => [photo]; | ||
} | ||
|
||
class _Reset extends AuthEvent { | ||
const _Reset(); | ||
} | ||
|
||
/// Request for current auth state | ||
class _AuthCheckRequested extends AuthEvent { | ||
const _AuthCheckRequested(); | ||
} | ||
|
||
/// Sign out | ||
class _SignedOut extends AuthEvent { | ||
const _SignedOut(); | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This screams of Switch.
Maybe we can add a const to each event (parent class and need to override), eg.
const eventName = "SIGN_IN_WITH_PHONE";