feat(recipe): add creating recipes

This commit is contained in:
Alex
2024-12-18 11:56:20 +03:00
parent f6d4ea7df6
commit e0ec45e19e
24 changed files with 2267 additions and 510 deletions

View File

@@ -152,6 +152,9 @@ class _FeedScreenState extends State<FeedScreen> {
_searchBar(),
SizedBox(width: 12),
switch (_selectedChipIndex) {
1 => _addItemButton(
onTap: () => GoRouter.of(context).pushNamed('recipeCreateScreen'),
),
2 => _addItemButton(
onTap: state.profile?.role == 'consultant' ? () => GoRouter.of(context).pushNamed(CreateDietScreen.name) : null,
),