-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Clean code of shared folder #249
Conversation
xpwmaosldk
commented
Jun 23, 2022
- Change local variables type (ref: https://dart.dev/guides/language/effective-dart/design#dont-redundantly-type-annotate-initialized-local-variables)
- Move UploadProfileImage method from UserService to NetworkService
child: ImmichLoadingIndicator(), | ||
), | ||
) | ||
: const SizedBox(); |
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.
I am not used to return SizedBox
for empty Widget, is it the same as return Container()
?
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.
Yes, something different.
ref: https://dart-lang.github.io/linter/lints/sized_box_for_whitespace.html
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.
Learning a lot from you!
late final Dio dio; | ||
|
||
NetworkService() { | ||
dio = Dio(); |
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 is very cool, to instantiate only once and add the interceptor at the constructor. Love this change!
This is good to merge, let me know if there is anything else you would like to add Edited - Forgot the question about the |