Some Error Occured type ‘List<Object?>’ is not a subtype of type ‘PigeonUserDetails?’ in type cast
Upgrade all the dependency related to firebase login or firebase cloud.
Before this error arose everything was working fine in the project.
Here is the method that I used for firebase login through email and password.
Future<User?> signInWithEmailAndPasswrod(String email, String password) async{
try{
UserCredential credential = await _auth.signInWithEmailAndPassword(email: email, password: password);
return credential.user;
}
catch(err){
debugPrint("Some Error Occured $err");
}
return null;
}
2
Answers
I think typeCast problem is where you’re using this function.
userLogin = signInWithEmailAndPasswrod("yourEmailAddress", "yourPassword")
Rather than returning that credential I would suggest to use credentials as below.
I faced a similar issue where some of my Firebase packages wouldn’t update past a certain version after running flutter pub upgrade. Upon investigation, I realized that the issue was caused by the
cached_network_image package
.Here’s how I resolved the problem:
cached_network_image
package from my project.flutter clean
to clear the build cache.flutter pub get
to fetch dependencies.pub upgrade
to ensure all packages were up-to-date.P.S. Uninstall the app on the device as well; ensure a completely clean build.
After these steps, everything returned to normal, and the Firebase packages upgraded successfully.