updatePassword method

Future<void> updatePassword(
  1. String password
)

Implementation

Future<void> updatePassword(String password) async {
  if (password.isEmpty) return;
  if (currentUser == null) return;
  if (password.isValidMediumPassword) {
    try {
      await currentUser!.updatePassword(password);
    } on FirebaseAuthException catch (e) {
      if (e.code == 'weak-password') {
      } else if (e.code == 'requires-recent-login') {
        if (kDebugMode) print(' Something Went Wrong  $e');
      }
    } catch (e) {
      if (kDebugMode) print(' Something Went Wrong  $e');
    }
  }
}