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
This commit is contained in:
vjrj 2026-03-06 16:24:04 +01:00
parent cc85ca7e0e
commit 956165c524

View file

@ -67,11 +67,14 @@ class _ActiveFiresPageState extends State<ActiveFiresPage> {
child: const Icon(Icons.location_searching),
backgroundColor: fires600,
label: S.of(context).addYourCurrentPosition,
labelWidget: Container(
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,11 +83,14 @@ class _ActiveFiresPageState extends State<ActiveFiresPage> {
child: const Icon(Icons.edit_location),
backgroundColor: fires600,
label: S.of(context).addSomePlace,
labelWidget: Container(
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<ActiveFiresPage> {
},
),
),
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: <Widget>[
RefreshIndicator(
child: _buildSavedLocations(
context,
view.yourLocations,
view.onDelete,
view.onToggleSubs,
view.onTap),
? RefreshIndicator(
child: _buildSavedLocations(context, view.yourLocations,
view.onDelete, view.onToggleSubs, view.onTap),
onRefresh: () async {
final Completer<void> completer =
Completer<void>();
final Completer<void> completer = Completer<void>();
view.onRefresh(completer);
return completer.future;
}),
SpeedDial(
icon: Icons.add,
activeIcon: Icons.close,
backgroundColor: fires600,
children: _fabMiniMenuItemList(context, view.onAdd),
)
])
})
: Center(
child: CenteredColumn(children: <Widget>[
RoundedBtn(