ResoCoder / flutter-ddd-firebase-course

https://resocoder.com/flutter-firebase-ddd-course
GNU General Public License v3.0
470 stars 161 forks source link

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

Open Jordanus123 opened 2 years ago

Jordanus123 commented 2 years ago

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