Skip to content

Commit 4fd041d

Browse files
fix(ui_auth): fix confirmation dialog for delete account button (#346)
Co-authored-by: russellwheatley <[email protected]>
1 parent eb9e2bd commit 4fd041d

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

packages/firebase_ui_auth/lib/src/widgets/delete_account_button.dart

+4-3
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,8 @@ class _DeleteAccountButtonState extends State<DeleteAccountButton> {
8282
fba.FirebaseAuth get auth => widget.auth ?? fba.FirebaseAuth.instance;
8383
bool _isLoading = false;
8484

85-
void Function() pop<T>(T result) => () => Navigator.of(context).pop(result);
85+
void Function() pop<T>(BuildContext context, T result) =>
86+
() => Navigator.of(context).pop(result);
8687

8788
Future<void> _deleteAccount() async {
8889
bool? confirmed = !widget.showDeleteConfirmationDialog;
@@ -94,8 +95,8 @@ class _DeleteAccountButtonState extends State<DeleteAccountButton> {
9495
context: context,
9596
builder: (context) {
9697
return UniversalAlert(
97-
onConfirm: pop(true),
98-
onCancel: pop(false),
98+
onConfirm: pop(context, true),
99+
onCancel: pop(context, false),
99100
title: l.confirmDeleteAccountAlertTitle,
100101
confirmButtonText: l.confirmDeleteAccountButtonLabel,
101102
cancelButtonText: l.cancelButtonLabel,

0 commit comments

Comments
 (0)