alexeyinkin commented on code in PR #25347:
URL: https://github.com/apache/beam/pull/25347#discussion_r1098498691
##########
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:
The simplest solution is to first pop the dialog and then to delete the
account.
--
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]