feat(recipe): Main menu buttons and API implementtion

This commit is contained in:
2024-05-14 12:14:33 +03:00
parent a32117953d
commit a440d31ab6
8 changed files with 48 additions and 28 deletions

View File

@@ -40,7 +40,6 @@ class RecipeSelectScreen extends StatelessWidget {
_buildSetingsScreen(BuildContext context, RecipeSelectLoadedState state) {
mediaQueryData = MediaQuery.of(context);
print(state.posts);
return SafeArea(
child: Scaffold(
backgroundColor: Colors.grey[200],
@@ -86,6 +85,16 @@ class RecipeSelectScreen extends StatelessWidget {
margin: EdgeInsets.only(
left: 80.h, top: 12.v, bottom: 9.v),
),
Spacer(),
Padding(
padding: const EdgeInsets.only(right: 20.0),
child: GestureDetector(
onTap: () => Navigator.pushNamed(
context,
AppRoutes.recipeCreateScreen,
),
child: Icon(Icons.create_outlined)),
)
],
),
),
@@ -140,6 +149,13 @@ class RecipeSelectScreen extends StatelessWidget {
AppRoutes.recipeScreen,
arguments: post?['id'].toString(),
),
trailing: GestureDetector(
onTap: () => Navigator.pushNamed(
context,
AppRoutes.recipeEditScreen,
arguments: post?['id'].toString(),
),
child: Icon(Icons.edit)),
));
},
),