-
Notifications
You must be signed in to change notification settings - Fork 115
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
Error with copyWith in sign_in_form_bloc.dart #11
Comments
Hello! This is extremely strange because |
Thanks for your answer. |
I also had a similar problem.
Thing is that the generated file causes issues with copyWith(...)
The only workaround I found so far was to use the exact generated version
from Matej's repo instead of the one generated locally...
Le lun. 4 mai 2020 à 21:44, Daniel Arduini <notifications@github.com> a
écrit :
… Thanks for your answer.
Yes, I've already executed the command. I've also tried changing the
freezed version, using both the one present in your project and the latest
version.
The strange thing is that if I try to print state.copyWith( ... ), in the
console I can see the status updated with the data present in the event,
but despite this, the bloc status doesn't change.
I really don't know what the problem could be.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#11 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AATA2SPRXMB5ISNLUQOL3XLRP4LJLANCNFSM4MVK5TWA>
.
|
Hello! Same problem here...
|
I found my error. I was throwing left(...) in value_validators.dart instead of return it 😅 |
Trying to follow this example (https://github.com/felangel/bloc/tree/master/examples/flutter_login), I finally found the cause of the problem. Then I had to add two more parameters (isEmailValid, isPasswordValid) to the state that check if the data are valid. This is my solution.
|
danke @Daniel203 |
The copyWith() method doesn't work inside sign_in_form_bloc.dart.
The state doesn't change when the user types the email or password inside the UI form.
The event is properly working and contains the changed value, but I can't add this value to the state.
The state remains in initial form even after the copyWith().
The text was updated successfully, but these errors were encountered: