-
Notifications
You must be signed in to change notification settings - Fork 1
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
refactor: make network response a sealed class #14
Conversation
@JsonKey(ignore: true) | ||
/// Create a copy of SturdyHttpEvent | ||
/// with the given fields replaced by the non-null parameter values. | ||
@JsonKey(includeFromJson: false, includeToJson: false) |
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.
just curious why this freezed file changed so much when the only change in the base file was removing an import 🤔
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.
Likely because when I cloned and pub get
'd, a different (higher) version of freezed
was pulled than the one that generated the original file, and new code is generated with the newer version.
Because pana
failed (version decreased) I'm looking at upgrading some packages anyway so that may help make that more intuitive.
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.
OK @ClaireDavis, should be good to go now!
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.
domain lgtm
/no-platform |
📰 Summary of changes
This PR changes
NetworkResponse
from being a freezed model to being a propersealed class
, allowing dart's switch/pattern matching syntax.🧪 Testing done
No functional behavior has changed, all tests should pass.