EmptyState.noData constructor
EmptyState.noData({
- Key? key,
- String? message,
- VoidCallback? onCreate,
Shows an empty state for screens with no data yet.
Implementation
factory EmptyState.noData({
Key? key,
String? message,
VoidCallback? onCreate,
}) => EmptyState(
key: key,
message: message ?? 'Get started by adding your first item.',
icon: Icons.inbox_outlined,
title: 'Nothing here yet',
actionLabel: onCreate != null ? 'Create' : null,
onAction: onCreate,
);