Delete user account in the flutter firebase

 use this function for this purpose.

1.

class DatabaseService {
final String uid;

DatabaseService({this.uid});

final CollectionReference userCollection =
Firestore.instance.collection('users');

Future deleteuser() {
return userCollection.document(uid).delete();
}
}

2.

FirebaseUser user = await FirebaseAuth.instance.currentUser();
user.delete();

Post a Comment

Previous Post Next Post

Subscribe Us


Get tutorials, Flutter news and other exclusive content delivered to your inbox. Join 1000+ growth-oriented Flutter developers subscribed to the newsletter

100% value, 0% spam. Unsubscribe anytime