delete method

Future<void> delete({
  1. String? password,
  2. bool deleteAuth = true,
  3. Yust? yust,
})

Deletes the user.

Implementation

Future<void> delete(
    {String? password, bool deleteAuth = true, Yust? yust}) async {
  await (yust?.dbService ?? Yust.databaseService)
      .deleteDoc<YustUser>(YustUser.setup(), this);
  if (deleteAuth) await Yust.authService.deleteAccount(password);
}