-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Should certain types be renamed? BlocXXX
-> CubitXXX
#1708
Comments
Hi @wujek-srujek 👋 This is a duplicate of #1560. TL;DR adding Cubit widgets increases the API surface area without providing significant benefits and most of the feedback on the original issue was in favor of leaving the naming as is (or even using Hope that helps! Closing for now since this is a duplicate but feel free to add additional comments and I'm happy to continue the conversation 👍 |
I wasn't asking if you should add Cubit widgets, but rather rename the existing ones starting with To be honest, I personally find the decision to merge Cubit into the BLoC library and make it so prominent kind of strange as it is feels half-ready. The fact that I now have It's also kind of strange to read the documentation of Sorry for the criticism, but the latest versions of the library with the
everything would be a |
BTW, where does the name 'cubit' come from, what does it mean? |
@wujek-srujek this decision was made because if we wanted to be really strict then the entire BlocBuilder(
bloc: CounterCubit(),
builder: (context, state) {...},
) This way the "bloc" is referring to the package prefix and provides a consistent developer experience. Is that something you feel would improve your experience? The trouble with calling the current Regarding the naming, Would love to hear your thoughts and sorry for any inconvenience/confusion! I hope I communicated the rationale behind the current API and why it wasn't an easy decision to make. |
I have been looking through the code of the latest version and I noticed the
Cubit
type has become more prominent. For example,BlocBuilder
first type parameter is actually aCubit
(as it is the root of the hierarchy and BLoCs are Cubits). Shouldn't it be renamed toCubitBuilder
, then? Right now I need to use aBlocBuilder
even if I don't have a single BLoC in my codebase because I have Cubits. This question also pertains to many other types, likeBlocConsumer
,BlocListener
,BlocWidgetBuilder
andBlocBuilderCondition
typedefs etc. I understand it would be a rather big undertaking resulting in a multitude of renamings and backwards-incompatible code...The text was updated successfully, but these errors were encountered: