Skip to content

Commit 0e3a7c4

Browse files
Mad-ScientistXDaniel Plitrussellwheatley
authored
fix(ui_auth): fix confirmation dialog for unlink account button in profile screen (#373)
Co-authored-by: Daniel Plit <[email protected]> Co-authored-by: Russell Wheatley <[email protected]>
1 parent 3609796 commit 0e3a7c4

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

Diff for: packages/firebase_ui_auth/lib/src/screens/profile_screen.dart

+4-7
Original file line numberDiff line numberDiff line change
@@ -195,11 +195,8 @@ class _LinkedProvidersRowState extends State<_LinkedProvidersRow> {
195195
});
196196
}
197197

198-
void Function() pop(bool value) {
199-
return () {
200-
Navigator.of(context).pop(value);
201-
};
202-
}
198+
void Function() pop<T>(BuildContext context, T result) =>
199+
() => Navigator.of(context).pop(result);
203200

204201
Future<void> _unlinkProvider(BuildContext context, String providerId) async {
205202
setState(() {
@@ -216,8 +213,8 @@ class _LinkedProvidersRowState extends State<_LinkedProvidersRow> {
216213
context: context,
217214
builder: (context) {
218215
return UniversalAlert(
219-
onConfirm: pop(true),
220-
onCancel: pop(false),
216+
onConfirm: pop(context, true),
217+
onCancel: pop(context, false),
221218
title: l.ulinkProviderAlertTitle,
222219
confirmButtonText: l.confirmUnlinkButtonLabel,
223220
cancelButtonText: l.cancelButtonLabel,

0 commit comments

Comments
 (0)