feat: Add user recipe management and creation functionality, including models, widgets, cubits, repositories, and tests.

This commit is contained in:
mso7nueh
2026-02-25 13:10:07 +03:00
parent 5167766dbf
commit 0641513ebe
10 changed files with 220 additions and 71 deletions

View File

@@ -153,7 +153,16 @@ class OtherRoutes {
GoRoute(
path: RecipeCreateScreen.path,
name: RecipeCreateScreen.name,
builder: (context, state) => RecipeCreateScreen(recipe: state.extra != null ? state.extra as Recipe : null),
builder: (context, state) {
if (state.extra is Map<String, dynamic>) {
final data = state.extra as Map<String, dynamic>;
return RecipeCreateScreen(
recipe: data['recipe'] as Recipe?,
autoValidate: data['autoValidate'] as bool? ?? false,
);
}
return RecipeCreateScreen(recipe: state.extra != null ? state.extra as Recipe : null);
},
),
GoRoute(
path: CreateDietScreen.path,