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.
This commit is contained in:
Achintha Isuru
2026-01-22 13:35:30 -05:00
parent cd0b591c5c
commit b73abc5487

View File

@@ -46,8 +46,18 @@ class ClientHubsPage extends StatelessWidget {
},
builder: (context, state) {
return Scaffold(
backgroundColor: UiColors.bgMenu,
floatingActionButton: FloatingActionButton(
onPressed: () => BlocProvider.of<ClientHubsBloc>(
context,
).add(const ClientHubsAddDialogToggled(visible: true)),
shape: const RoundedRectangleBorder(
borderRadius: BorderRadius.all(Radius.circular(8)),
),
child: const Icon(UiIcons.add),
),
body: Stack(
children: [
children: <Widget>[
CustomScrollView(
slivers: [
_buildAppBar(context),
@@ -185,17 +195,6 @@ class ClientHubsPage extends StatelessWidget {
),
],
),
UiButton.primary(
onPressed: () => BlocProvider.of<ClientHubsBloc>(
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),
),
),
],
),
],