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:
@@ -46,8 +46,18 @@ class ClientHubsPage extends StatelessWidget {
|
|||||||
},
|
},
|
||||||
builder: (context, state) {
|
builder: (context, state) {
|
||||||
return Scaffold(
|
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(
|
body: Stack(
|
||||||
children: [
|
children: <Widget>[
|
||||||
CustomScrollView(
|
CustomScrollView(
|
||||||
slivers: [
|
slivers: [
|
||||||
_buildAppBar(context),
|
_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),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
|||||||
Reference in New Issue
Block a user