EmptyState.noData constructor

EmptyState.noData({
  1. Key? key,
  2. String? message,
  3. 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,
);