feat: add recipe creation, editing, and detail screens; enhance recipe model with instructions and ingredients
This commit is contained in:
@@ -17,3 +17,12 @@ final recipesProvider = FutureProvider<List<Recipe>>((ref) async {
|
||||
() => ref.read(recipeRepositoryProvider).fetchRecipes(token: token),
|
||||
);
|
||||
});
|
||||
|
||||
final recipeDetailProvider =
|
||||
FutureProvider.family<Recipe, int>((ref, id) async {
|
||||
final token = await ref.watch(authStateProvider.future);
|
||||
return guardedApiCall(
|
||||
ref,
|
||||
() => ref.read(recipeRepositoryProvider).fetchRecipeDetail(id, token: token),
|
||||
);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user