Skip to content
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

Migration notes missing for 7.0 #2228

Closed
wujek-srujek opened this issue Mar 13, 2021 · 3 comments · Fixed by #2251
Closed

Migration notes missing for 7.0 #2228

wujek-srujek opened this issue Mar 13, 2021 · 3 comments · Fixed by #2251
Assignees
Labels
documentation Documentation requested question Further information is requested
Projects

Comments

@wujek-srujek
Copy link

wujek-srujek commented Mar 13, 2021

Describe the bug
Now Cubit extends Bloc, contrary to the previous Bloc extends Cubit introduced in 6.0.0. It doesn't cause any issues for me and I actually noticed this by accident after migrating my app to null safety, and flutter_bloc to 7.0.0-nullsafety - I am experimenting with a change and was looking for the cubit parameter in a BlocBuilder that is now gone. I looked into migration.md and there isn't written anything about it yet. I understand that the 7.0.0 version isn't final yet so I'm just making sure this doesn't get forgotten in all the work that is necessary for null safety support.

As a side question: why this change, how is it beneficial for the hierarchy to be reversed? Does it make something possible that wasn't before? It has disadvantages, it does introduce a weird API for Cubit in which the user can actually call add (with null only, I guess) but it will always fail due to an error throw by Cubit.mapEventToState.

@dawidd6
Copy link
Contributor

dawidd6 commented Mar 13, 2021

cubit parameter for BlocBuilder is now changed to bloc, which accepts both a Bloc and a Cubit since the latter extends the former. As of why this change was introduced, I don't know, but 7.0.0 is still a prerelease I think.

@wujek-srujek
Copy link
Author

@dawidd6 Yes I am aware of that, I checked the code. I just wanted to make sure the migration docs get updated, and also wanted to ask about the rationale - I am a big fan of BLoC and this library, it is a vital part of my apps, and I like to understand things. I haven't found any issue relating to it, hence the question.

@felangel felangel self-assigned this Mar 15, 2021
@felangel felangel added documentation Documentation requested question Further information is requested labels Mar 15, 2021
@felangel felangel added this to To do in bloc via automation Mar 15, 2021
@felangel
Copy link
Owner

Hi @wujek-srujek 👋
Thanks for opening an issue!

I haven't forgotten about the migration guide but there are still several changes that may or may not land before a stable release can be published and we'll be sure to have the migration guide ready before v7.0.0 is released 👍

Regarding your second question, I was just working on a proposal to hopefully address this and several other issues at #2235. I would love your feedback/thoughts and thanks as always for being an extremely valuable member of the community! 🙏

bloc automation moved this from To do to Done Mar 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Documentation requested question Further information is requested
Projects
bloc
  
Done
Development

Successfully merging a pull request may close this issue.

3 participants