updatePassword method Null safety

Future<void> updatePassword(
  1. String newPassword

Updates the user's password.

Important: this is a security sensitive operation that requires the user to have recently signed in. If this requirement isn't met, ask the user to authenticate again and then call User.reauthenticateWithCredential.

A FirebaseAuthException maybe thrown with the following error code:

  • weak-password:
  • Thrown if the password is not strong enough.
  • requires-recent-login:
  • Thrown if the user's last sign-in time does not meet the security threshold. Use User.reauthenticateWithCredential to resolve. This does not apply if the user is anonymous.


Future<void> updatePassword(String newPassword) async {
  throw UnimplementedError('updatePassword() is not implemented');