diff --git a/lib/ui/routes/settings/account_settings_route.dart b/lib/ui/routes/settings/account_settings_route.dart index d3cf3eb..29750b9 100644 --- a/lib/ui/routes/settings/account_settings_route.dart +++ b/lib/ui/routes/settings/account_settings_route.dart @@ -1,3 +1,4 @@ +import 'package:comunic/ui/routes/TourRoute.dart'; import 'package:comunic/ui/routes/settings/account_image_settings.dart'; import 'package:comunic/ui/routes/settings/account_privacy_settings.dart'; import 'package:comunic/ui/routes/settings/account_security_settings.dart'; @@ -11,6 +12,8 @@ import 'package:comunic/utils/ui_utils.dart'; import 'package:flutter/material.dart'; import 'package:settings_ui/settings_ui.dart'; +enum _MainMenuActions { SHOW_TOUR } + /// Account settings route /// /// @author Pierre HUBERT @@ -38,10 +41,29 @@ class AccountSettingsRoute extends StatelessWidget { return Scaffold( appBar: AppBar( title: Text(tr("Settings")), + actions: [ + PopupMenuButton<_MainMenuActions>( + onSelected: (v) => _doPopupMenuAction(context, v), + itemBuilder: (c) => [ + PopupMenuItem( + value: _MainMenuActions.SHOW_TOUR, + child: Text(tr("See the tour again")), + ), + ]), + ], ), body: _AccountSettingsBody(), ); } + + void _doPopupMenuAction(BuildContext context, _MainMenuActions value) async { + switch (value) { + case _MainMenuActions.SHOW_TOUR: + Navigator.of(context) + .push(MaterialPageRoute(builder: (c) => TourRoute())); + break; + } + } } class _AccountSettingsBody extends StatefulWidget {