Merge remote-tracking branch 'upstream/main' into issue-914

This commit is contained in:
misha
2026-03-04 09:21:45 +03:00
31 changed files with 793 additions and 200 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,