nausharipov commented on code in PR #25347:
URL: https://github.com/apache/beam/pull/25347#discussion_r1098313760


##########
learning/tour-of-beam/frontend/lib/components/profile/user_menu.dart:
##########
@@ -125,9 +125,29 @@ class _Buttons extends StatelessWidget {
         ),
         const BeamDivider(),
         _IconLabel(
-          onTap: () {},
+          onTap: () {
+            closeOverlayCallback();
+            showDialog(
+              context: context,
+              builder: (context) => Dialog(
+                backgroundColor: Colors.transparent,
+                child: BeamAlertDialog(
+                  body: 'dialogs.deleteAccountWarning'.tr(),
+                  continueLabel: 'ui.deleteMyAccount'.tr(),
+                  title: 'ui.deleteTobAccount'.tr(),
+                  onContinue: () {
+                    authNotifier.deleteAccount().then(
+                      (_) {
+                        Navigator.pop(context);
+                      },
+                    );
+                  },

Review Comment:
   1. Linter is against using context in async functions.
   2. Is a status enum in AuthNotifier the simplest solution for such behavior?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to