Hi,
I tried to make your login example work in my current project.
Almost everything works fine !
I have a problem when firing the LoginSubmitted event.
My blocBuilder is notified when the first yield is fired:
yield state.copyWith(status: FormzStatus.submissionInProgress);
But never notified when the second yield is fired:
yield state.copyWith(status: FormzStatus.submissionSuccess);
In debug mode, my breakpoint is reached so the submissionSuccess is normally fired.
I'm not able to provide a sample to test, since the code is client payed.
Any idea why only 1 yield is received when firing the LoginSubmitted event?
context.bloc
Thanks for any advice ;)
Hi @LaurentMalmendier 馃憢
Thanks for opening an issue!
Can you please provide a link to a complete sample app which illustrates the issue? I鈥檓 guessing you鈥檙e navigating to another screen on submissionSuccess which could result in the widget being unmounted. Thanks! 馃檹
Hi @felangel
Thank you for your quick reply, really appreciate ;)
Here is a sample App.
The BlocBuilder in sign_in_screen receive the initial state (none).
When we click the login button, the bloc builder receive the first yield "submissionInProgress". But not the second yield fired 3 secondes later (submissionSuccess).
It is very likely that i didn't understand the core concept of bloc ^_^
Hi @LaurentMalmendier 馃憢
I fixed your issue in this PR.
You didn't pass your status to equatable's props thus your states were considered equal.
Thank you so much @RollyPeres 馃檹
This issue can be closed !
Most helpful comment
Thank you so much @RollyPeres 馃檹
This issue can be closed !