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:
parent
cc85ca7e0e
commit
956165c524
1 changed files with 29 additions and 31 deletions
|
|
@ -67,10 +67,13 @@ class _ActiveFiresPageState extends State<ActiveFiresPage> {
|
||||||
child: const Icon(Icons.location_searching),
|
child: const Icon(Icons.location_searching),
|
||||||
backgroundColor: fires600,
|
backgroundColor: fires600,
|
||||||
label: S.of(context).addYourCurrentPosition,
|
label: S.of(context).addYourCurrentPosition,
|
||||||
labelWidget: Container(
|
labelWidget: Padding(
|
||||||
color: Colors.white,
|
padding: const EdgeInsets.only(right: 16.0),
|
||||||
child: Text(S.of(context).addYourCurrentPosition,
|
child: Container(
|
||||||
style: const TextStyle(color: Colors.black38)),
|
color: Colors.white,
|
||||||
|
child: Text(S.of(context).addYourCurrentPosition,
|
||||||
|
style: const TextStyle(color: Colors.black38)),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
onTap: () {
|
onTap: () {
|
||||||
onAddYourLocation(onAdd);
|
onAddYourLocation(onAdd);
|
||||||
|
|
@ -80,10 +83,13 @@ class _ActiveFiresPageState extends State<ActiveFiresPage> {
|
||||||
child: const Icon(Icons.edit_location),
|
child: const Icon(Icons.edit_location),
|
||||||
backgroundColor: fires600,
|
backgroundColor: fires600,
|
||||||
label: S.of(context).addSomePlace,
|
label: S.of(context).addSomePlace,
|
||||||
labelWidget: Container(
|
labelWidget: Padding(
|
||||||
color: Colors.white,
|
padding: const EdgeInsets.only(right: 16.0),
|
||||||
child: Text(S.of(context).addSomePlace,
|
child: Container(
|
||||||
style: const TextStyle(color: Colors.black38)),
|
color: Colors.white,
|
||||||
|
child: Text(S.of(context).addSomePlace,
|
||||||
|
style: const TextStyle(color: Colors.black38)),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
onTap: () {
|
onTap: () {
|
||||||
onAddOtherLocation(onAdd);
|
onAddOtherLocation(onAdd);
|
||||||
|
|
@ -238,33 +244,25 @@ class _ActiveFiresPageState extends State<ActiveFiresPage> {
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
floatingActionButtonLocation:
|
floatingActionButton: SpeedDial(
|
||||||
FloatingActionButtonLocation.centerFloat,
|
icon: Icons.add,
|
||||||
|
activeIcon: Icons.close,
|
||||||
|
backgroundColor: fires600,
|
||||||
|
spacing: 12,
|
||||||
|
children: _fabMiniMenuItemList(context, view.onAdd),
|
||||||
|
),
|
||||||
bottomNavigationBar: const GlobalFiresBottomStats(),
|
bottomNavigationBar: const GlobalFiresBottomStats(),
|
||||||
body: view.isLoading
|
body: view.isLoading
|
||||||
? const FiresSpinner()
|
? const FiresSpinner()
|
||||||
: hasLocations
|
: hasLocations
|
||||||
? Stack(children: <Widget>[
|
? RefreshIndicator(
|
||||||
RefreshIndicator(
|
child: _buildSavedLocations(context, view.yourLocations,
|
||||||
child: _buildSavedLocations(
|
view.onDelete, view.onToggleSubs, view.onTap),
|
||||||
context,
|
onRefresh: () async {
|
||||||
view.yourLocations,
|
final Completer<void> completer = Completer<void>();
|
||||||
view.onDelete,
|
view.onRefresh(completer);
|
||||||
view.onToggleSubs,
|
return completer.future;
|
||||||
view.onTap),
|
})
|
||||||
onRefresh: () async {
|
|
||||||
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(
|
: Center(
|
||||||
child: CenteredColumn(children: <Widget>[
|
child: CenteredColumn(children: <Widget>[
|
||||||
RoundedBtn(
|
RoundedBtn(
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue