From 296a89b165fd8a5600d9c75da9c4b07ad92710cf Mon Sep 17 00:00:00 2001 From: Nils-Johan Gynther Date: Wed, 22 Apr 2026 08:17:40 +0200 Subject: [PATCH] feat: enhance EmptyStateView layout with positioned action button for better UX --- .../presentation/inventory_screen.dart | 20 ++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/flutter/lib/features/inventory/presentation/inventory_screen.dart b/flutter/lib/features/inventory/presentation/inventory_screen.dart index 6fe87383..6b3bb0ba 100644 --- a/flutter/lib/features/inventory/presentation/inventory_screen.dart +++ b/flutter/lib/features/inventory/presentation/inventory_screen.dart @@ -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(