feat(import): enhance recipe creation by passing both markdown and image URL from import

This commit is contained in:
Nils-Johan Gynther
2026-04-22 21:38:05 +02:00
parent 856efcfa79
commit 29beb3a85f
3 changed files with 29 additions and 5 deletions
@@ -78,8 +78,11 @@ class _RecipeImportTabState extends ConsumerState<RecipeImportTab> {
);
if (!mounted) return;
// Pass markdown as GoRouter extra — CreateRecipeScreen picks it up.
context.push('/recipes/create', extra: result.markdown);
// Pass both markdown and imageUrl so CreateRecipeScreen can pre-fill both.
context.push('/recipes/create', extra: {
'markdown': result.markdown,
'imageUrl': result.imageUrl,
});
} catch (e) {
if (!mounted) return;
setState(() => _error = mapErrorToUserMessage(e, context));