From b73abc54877a903b3a0497b16e2396be94cc0ec2 Mon Sep 17 00:00:00 2001 From: Achintha Isuru Date: Thu, 22 Jan 2026 13:35:30 -0500 Subject: [PATCH] chore: Add floating action button for adding client hubs Replaces the primary button for adding hubs with a floating action button and sets the background color of the Scaffold. This improves the UI by providing a more standard and accessible way to add new hubs. --- .../presentation/pages/client_hubs_page.dart | 23 +++++++++---------- 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/apps/mobile/packages/features/client/hubs/lib/src/presentation/pages/client_hubs_page.dart b/apps/mobile/packages/features/client/hubs/lib/src/presentation/pages/client_hubs_page.dart index 04ea1cca..27757a85 100644 --- a/apps/mobile/packages/features/client/hubs/lib/src/presentation/pages/client_hubs_page.dart +++ b/apps/mobile/packages/features/client/hubs/lib/src/presentation/pages/client_hubs_page.dart @@ -46,8 +46,18 @@ class ClientHubsPage extends StatelessWidget { }, builder: (context, state) { return Scaffold( + backgroundColor: UiColors.bgMenu, + floatingActionButton: FloatingActionButton( + onPressed: () => BlocProvider.of( + context, + ).add(const ClientHubsAddDialogToggled(visible: true)), + shape: const RoundedRectangleBorder( + borderRadius: BorderRadius.all(Radius.circular(8)), + ), + child: const Icon(UiIcons.add), + ), body: Stack( - children: [ + children: [ CustomScrollView( slivers: [ _buildAppBar(context), @@ -185,17 +195,6 @@ class ClientHubsPage extends StatelessWidget { ), ], ), - UiButton.primary( - onPressed: () => BlocProvider.of( - context, - ).add(const ClientHubsAddDialogToggled(visible: true)), - text: t.client_hubs.add_hub, - leadingIcon: UiIcons.add, - style: ElevatedButton.styleFrom( - minimumSize: const Size(0, 40), - maximumSize: const Size.fromHeight(40), - ), - ), ], ), ],