DeleteAccountButton constructor

const DeleteAccountButton({
  1. Key? key,
  2. FirebaseAuth? auth,
  3. SignInRequiredCallback? onSignInRequired,
  4. DeleteFailedCallback? onDeleteFailed,
  5. ButtonVariant variant = ButtonVariant.filled,
  6. bool showDeleteConfirmationDialog = false,
})

A button that triggers the deletion of the user's account.

If you want to perform an action after the account is deleted, you can use AccountDeletedAction.

Example usage:

ProfileScreen(
  actions: [
    AccountDeletedAction((context, user) {
      // Do something after the account is deleted.
    }),
  ],
);

or

FirebaseUIActions(
  actions: [
    AccountDeletedAction((context, user) {
      // Do something after the account is deleted.
    }),
  ],
  // MyCustomScreen should use DeleteAccountButton internally.
  child: MyCustomScreen(),
)

Implementation

const DeleteAccountButton({
  super.key,
  this.auth,
  this.onSignInRequired,
  this.onDeleteFailed,
  this.variant = ButtonVariant.filled,
  this.showDeleteConfirmationDialog = false,
});