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

Unhandled Exception: type 'Freezed' is not a subtype of type 'ValueObject<String>' of 'other' #32

Open
JordyBanany opened this issue Aug 15, 2022 · 0 comments

Comments

@JordyBanany
Copy link

i am getting an error on the emailChanged event. when i type in the textformfield i get Unhandled Exception: type 'Freezed' is not a subtype of type 'ValueObject' of 'other'.

the error points me to the freezed bloc file, specifically:

@OverRide
$Res call({
Object? emailAddress = freezed,
Object? password = freezed,
Object? isSubmitting = freezed,
Object? showErrorMessages = freezed,
Object? authFailureOrSuccessOption = freezed,
}) {
return then($_SignInFormState(
emailAddress: emailAddress == freezed
? _value.emailAddress
: emailAddress // ignore: cast_nullable_to_non_nullable
as EmailAddress,
password: password == freezed
? _value.password
: password // ignore: cast_nullable_to_non_nullable
as Password,

When i change the emailAddress: emailAddress == freezed
? _value.emailAddress into something like emailAddress: emailAddress == bool
? _value.emailAddress. the error changes to Unhandled Exception: type 'bool' is not a subtype of type 'ValueObject' of 'other'. is there something wrong with freezed??

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant