DeleteAccount.listTile constructor
DeleteAccount.listTile({
- required void onAccountDeleted(),
A ListTile that on tap will show a confirmation dialog to delete the user's account
onAccountDeleted
will be called if the user's account was deleted successfully
Implementation
factory DeleteAccount.listTile({
required void Function() onAccountDeleted,
}) {
final key = GlobalKey<DeleteAccountState>();
return DeleteAccount._(
key: key,
onAccountDeleted: onAccountDeleted,
child: Builder(
builder: (context) {
return ListTile(
onTap: () => key.currentState?.showConfirmationDialog(context),
title: Text(
ApptiveGridUserManagementLocalization.of(context)!.deleteAccount,
style: TextStyle(color: Theme.of(context).colorScheme.error),
),
);
},
),
);
}