flutter-ddd-firebase-course icon indicating copy to clipboard operation
flutter-ddd-firebase-course copied to clipboard

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

Open JordyBanany opened this issue 3 years ago • 0 comments

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<String>' 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<String>' of 'other'. is there something wrong with freezed??

JordyBanany avatar Aug 15 '22 10:08 JordyBanany