You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
And the current Bloc to another related to bloc like EventBloc or similar with Bloc keyword,
I think using cubit is the right decision for most cases, but the name is confusing if the bloc pattern is being implemented.
It would be an important change for current users, but I think it would help a lot of new users to use the bloc pattern, they would start using Bloc (previously Cubit), and if they have complex cases use the EventBloc (the current bloc), the api would be more related to the bloc pattern.
For example for now it sounds strange that the BlocBuilder receives a cubit
although felix said
Also cubit isn’t technically a bloc
Because there is no event sink so it’d be a bit misleading to name it Bloc imo
although technically it is true due to the implementation, we can see that Cubit is a short/easy way to use Bloc in some cases
Which is why I think it would be worth considering it as a bloc despite not complying with the rule
Inputs and outputs are simple Stream/Sinks only
Related to #1560
Since now we can use the same BlocListener, BlocBuilder, and BlocConsumerforBloc(previouslyCubit) and EventBlocor similar withBlockeyword (previouslyBloc`) without having any confusion with names
The text was updated successfully, but these errors were encountered:
It's extremely disruptive -- every resource/article/tutorial/example that previously used Bloc will no longer make sense and it will be very confusing in my opinion.
It's not accurate -- a Cubit is not a Bloc (there is no event sink) so it is misleading and will lead to more confusion.
Closing this for now in favor of continuing this discussion in #1560
Related to #1560
Hello, I suggested this is discord a few days ago
Why not rename
Cubit
toBloc
Bloc
to another related to bloc likeEventBloc
or similar withBloc
keyword,I think using cubit is the right decision for most cases, but the name is confusing if the bloc pattern is being implemented.
It would be an important change for current users, but I think it would help a lot of new users to use the bloc pattern, they would start using
Bloc
(previouslyCubit
), and if they have complex cases use theEventBloc
(the current bloc), the api would be more related to the bloc pattern.For example for now it sounds strange that the
BlocBuilder
receives a cubitalthough felix said
although technically it is true due to the implementation, we can see that
Cubit
is a short/easy way to useBloc
in some casesCheck #1427
Bloc
Cubit
Which is why I think it would be worth considering it as a
bloc
despite not complying with the ruleRelated to #1560
Since now we can use the same
BlocListener
, BlocBuilder, and
BlocConsumerfor
Bloc(previously
Cubit) and
EventBlocor similar with
Blockeyword (previously
Bloc`) without having any confusion with namesThe text was updated successfully, but these errors were encountered: