feat: enhance EmptyStateView layout with positioned action button for better UX
This commit is contained in:
@@ -21,13 +21,19 @@ class InventoryScreen extends ConsumerWidget {
|
||||
),
|
||||
data: (items) {
|
||||
if (items.isEmpty) {
|
||||
return EmptyStateView(
|
||||
title: 'Inventariet är tomt.',
|
||||
action: FloatingActionButton.extended(
|
||||
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(
|
||||
|
||||
Reference in New Issue
Block a user