From 956165c5245f3f3bddc88b231ff58e4b4218a2ad Mon Sep 17 00:00:00 2001 From: vjrj Date: Fri, 6 Mar 2026 16:24:04 +0100 Subject: [PATCH] Fix: Speed dial positioning - move to floatingActionButton and improve label spacing - Move SpeedDial from body Stack to floatingActionButton property - Position button correctly in bottom-right corner (not centered) - Add spacing: 12 to increase distance between child buttons - Add Padding(right: 16.0) to labels for better visual separation - Remove unnecessary floatingActionButtonLocation.centerFloat - Simplify body layout by removing Stack wrapper --- lib/activeFires.dart | 60 +++++++++++++++++++++----------------------- 1 file changed, 29 insertions(+), 31 deletions(-) diff --git a/lib/activeFires.dart b/lib/activeFires.dart index 005855f..a805333 100644 --- a/lib/activeFires.dart +++ b/lib/activeFires.dart @@ -67,10 +67,13 @@ class _ActiveFiresPageState extends State { child: const Icon(Icons.location_searching), backgroundColor: fires600, label: S.of(context).addYourCurrentPosition, - labelWidget: Container( - color: Colors.white, - child: Text(S.of(context).addYourCurrentPosition, - style: const TextStyle(color: Colors.black38)), + labelWidget: Padding( + padding: const EdgeInsets.only(right: 16.0), + child: Container( + color: Colors.white, + child: Text(S.of(context).addYourCurrentPosition, + style: const TextStyle(color: Colors.black38)), + ), ), onTap: () { onAddYourLocation(onAdd); @@ -80,10 +83,13 @@ class _ActiveFiresPageState extends State { child: const Icon(Icons.edit_location), backgroundColor: fires600, label: S.of(context).addSomePlace, - labelWidget: Container( - color: Colors.white, - child: Text(S.of(context).addSomePlace, - style: const TextStyle(color: Colors.black38)), + labelWidget: Padding( + padding: const EdgeInsets.only(right: 16.0), + child: Container( + color: Colors.white, + child: Text(S.of(context).addSomePlace, + style: const TextStyle(color: Colors.black38)), + ), ), onTap: () { onAddOtherLocation(onAdd); @@ -238,33 +244,25 @@ class _ActiveFiresPageState extends State { }, ), ), - floatingActionButtonLocation: - FloatingActionButtonLocation.centerFloat, + floatingActionButton: SpeedDial( + icon: Icons.add, + activeIcon: Icons.close, + backgroundColor: fires600, + spacing: 12, + children: _fabMiniMenuItemList(context, view.onAdd), + ), bottomNavigationBar: const GlobalFiresBottomStats(), body: view.isLoading ? const FiresSpinner() : hasLocations - ? Stack(children: [ - RefreshIndicator( - child: _buildSavedLocations( - context, - view.yourLocations, - view.onDelete, - view.onToggleSubs, - view.onTap), - onRefresh: () async { - final Completer completer = - Completer(); - view.onRefresh(completer); - return completer.future; - }), - SpeedDial( - icon: Icons.add, - activeIcon: Icons.close, - backgroundColor: fires600, - children: _fabMiniMenuItemList(context, view.onAdd), - ) - ]) + ? RefreshIndicator( + child: _buildSavedLocations(context, view.yourLocations, + view.onDelete, view.onToggleSubs, view.onTap), + onRefresh: () async { + final Completer completer = Completer(); + view.onRefresh(completer); + return completer.future; + }) : Center( child: CenteredColumn(children: [ RoundedBtn(