alexeyinkin commented on code in PR #25347:
URL: https://github.com/apache/beam/pull/25347#discussion_r1098487731
##########
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. Oh, by the way this is just the same problem, but the linter cannot spot
it. One solution is to let the dialog close itself by passing a callback to
`onContinue`, but this is ugly. Try to think of better ideas. Also this is
exactly why in app_state we have states pushing themselves out without a
context.
2. Yes.
--
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]