diff --git a/apps/mobile/packages/features/client/settings/lib/src/presentation/widgets/client_settings_page/settings_actions.dart b/apps/mobile/packages/features/client/settings/lib/src/presentation/widgets/client_settings_page/settings_actions.dart index f7fd3dbb..b906f258 100644 --- a/apps/mobile/packages/features/client/settings/lib/src/presentation/widgets/client_settings_page/settings_actions.dart +++ b/apps/mobile/packages/features/client/settings/lib/src/presentation/widgets/client_settings_page/settings_actions.dart @@ -1,7 +1,9 @@ +import 'package:client_settings/src/presentation/navigation/client_settings_navigator.dart'; import 'package:core_localization/core_localization.dart'; import 'package:design_system/design_system.dart'; import 'package:flutter/material.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; +import 'package:flutter_modular/flutter_modular.dart'; import '../../blocs/client_settings_bloc.dart'; /// A widget that displays the primary actions for the settings page. @@ -11,19 +13,31 @@ class SettingsActions extends StatelessWidget { @override Widget build(BuildContext context) { - final labels = t.client_settings.profile; + // Get the translations for the client settings profile. + final TranslationsClientSettingsProfileEn labels = + t.client_settings.profile; return SliverPadding( padding: const EdgeInsets.symmetric(horizontal: UiConstants.space5), sliver: SliverList( - delegate: SliverChildListDelegate([ + delegate: SliverChildListDelegate([ const SizedBox(height: UiConstants.space5), + + // Edit profile button UiButton.primary(text: labels.edit_profile, onPressed: () {}), + const SizedBox(height: UiConstants.space4), - UiButton.primary(text: labels.hubs, onPressed: () {}), + + // Hubs button + UiButton.primary( + text: labels.hubs, + onPressed: () => Modular.to.pushHubs(), + ), const SizedBox(height: UiConstants.space4), + + // Log out button BlocBuilder( - builder: (context, state) { + builder: (BuildContext context, ClientSettingsState state) { return UiButton.secondary( text: labels.log_out, onPressed: state is ClientSettingsLoading @@ -53,24 +67,27 @@ class SettingsActions extends StatelessWidget { 'Are you sure you want to log out?', style: UiTypography.body2r.textSecondary, ), - actions: [ - TextButton( - onPressed: () => Navigator.of(context).pop(), - child: Text( - t.common.cancel, - style: UiTypography.buttonM.textSecondary, - ), - ), + actions: [ + // Log out button TextButton( onPressed: () { - Navigator.of(context).pop(); + Modular.to.pop(); BlocProvider.of( context, ).add(const ClientSettingsSignOutRequested()); }, child: Text( t.client_settings.profile.log_out, - style: UiTypography.buttonM.textError, + style: UiTypography.buttonM.textSecondary, + ), + ), + + // Cancel button + TextButton( + onPressed: () => Modular.to.pop(), + child: Text( + t.common.cancel, + style: UiTypography.buttonM.textPrimary, ), ), ],