-
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
Add default mapper in BaseQueryCubit
#23
Comments
I agree with @pdenert. I saw many times |
The default implementation can be used only when My suggestion is, we start using Did I miss a case in which this doesn't work? |
SimpleCubits were developed for hooks. We can extract them from use_query_cubit.dart and change the parameters to named parameters for better readability. Also, mention them in README.md. |
Okay, will do |
TBH I feel like I do not have enough knowledge for this discussion. I have never used this package. I just wanted to say, that I saw many times in Activy where @pdenert uses this package occurrences of the T? map(T? data) => data It seems like redundant code that could be implemented as a default behavior. I hope @pdenert can answer your questions @michalina-majewska. |
Yeah, usage of the |
In many situations QueryCubit does not need to map the returned data, it just needs to pass it on. So we can cover this situation with the default mapper to avoid writing this boilerplate code:
The text was updated successfully, but these errors were encountered: