fix download button moving when tag camera sheet open

This commit is contained in:
stopflock
2025-08-06 15:30:34 -05:00
parent 9ad5c1ee1e
commit 9aa315bab2

View File

@@ -52,26 +52,31 @@ class _HomeScreenState extends State<HomeScreen> {
if (_followMe) setState(() => _followMe = false);
},
),
floatingActionButton: FloatingActionButton.extended(
onPressed: () => showDialog(
context: context,
builder: (ctx) => const DownloadAreaDialog(),
),
icon: const Icon(Icons.download_for_offline),
label: const Text('Download'),
heroTag: 'download_fab',
),
floatingActionButtonLocation: FloatingActionButtonLocation.endFloat,
persistentFooterButtons: appState.session == null
? [
FloatingActionButton.extended(
onPressed: _openAddCameraSheet,
icon: const Icon(Icons.add_location_alt),
label: const Text('Tag Camera'),
heroTag: 'tag_camera_fab',
),
]
floatingActionButton: appState.session == null
? Column(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.end,
children: [
FloatingActionButton.extended(
onPressed: _openAddCameraSheet,
icon: const Icon(Icons.add_location_alt),
label: const Text('Tag Camera'),
heroTag: 'tag_camera_fab',
),
const SizedBox(height: 12),
FloatingActionButton.extended(
onPressed: () => showDialog(
context: context,
builder: (ctx) => const DownloadAreaDialog(),
),
icon: const Icon(Icons.download_for_offline),
label: const Text('Download'),
heroTag: 'download_fab',
),
],
)
: null,
floatingActionButtonLocation: FloatingActionButtonLocation.endFloat,
);
}
}