I am using Flutter with the 'Firebase_auth' package. While I am making the following signUp function, I get an error on the 'UserUpdateInfo'.
signup(CustomUser user, AuthNotifier authNotifier) async {
UserCredential userCredential = await FirebaseAuth.instance
.createUserWithEmailAndPassword(email: user.email, password: user.password)
.catchError((error) => print(error.code));
if (userCredential != null) {
UserUpdateInfo updateInfo = UserUpdateInfo();
updateInfo.displayName = user.displayName;
User firebaseUser = userCredential.user;
if (firebaseUser != null) {
await firebaseUser.updateProfile(updateInfo);
await firebaseUser.reload();
print("Sign up: $firebaseUser");
User currentUser = await FirebaseAuth.instance.currentUser();
authNotifier.setUser(currentUser);
}}}
The following error is shown:
Undefined class 'UserUpdateInfo'
What can I do about it?