Skip to content

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

Description

@JordyBanany

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??

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions