feat: enhance EmptyStateView layout with positioned action button for better UX

This commit is contained in:
Nils-Johan Gynther
2026-04-22 08:17:40 +02:00
parent 4b146483fe
commit 296a89b165
@@ -21,13 +21,19 @@ class InventoryScreen extends ConsumerWidget {
),
data: (items) {
if (items.isEmpty) {
return EmptyStateView(
title: 'Inventariet är tomt.',
action: FloatingActionButton.extended(
onPressed: () => context.push('/inventory/create'),
icon: const Icon(Icons.add),
label: const Text('Lägg till'),
),
return Stack(
children: [
const EmptyStateView(title: 'Inventariet är tomt.'),
Positioned(
right: 16,
bottom: 16,
child: FloatingActionButton.extended(
onPressed: () => context.push('/inventory/create'),
icon: const Icon(Icons.add),
label: const Text('Lägg till'),
),
),
],
);
}
return Stack(