Skip to main content
Version: 1.0

Recipe Details

Full recipe details journey (FeatureRoute.Recipe.Details).

Visual Overview​

Recipe details

Parameters​

ParameterTypeRequiredDefaultWhat it does
displayRecipeDisplayRecipeyes—Mealz or external recipe id (FromMealzRecipeId / FromExternalRecipeId).
servesInt?nonullGuest / portion count to open with. Often forwarded from the recipe card.
navigationCallbackRecipeDetailsNavigationCallbackyes—Optional login / store / exit + catalog redirect.
modifierCompose Modifiernofills max sizeLayout.
stateContentstate overlaysnolibrary defaultOptional loading UI.
Serves

Do not choose an arbitrary serves value. If the recipe is already in the basket, serves must reflect the basket guest count (usually forwarded unchanged from goToRecipeDetails). Opening a screen with an arbitrary serves while the recipe is in-basket can desync portions/ingredients.

RecipeDetailsNavigationCallback​

CallbackRequiredWhat you must do
redirectToLogInnoOpen login. Defaults to a no-op.
redirectToStoreLocatornoOpen store picker. Defaults to a no-op.
exitnoClose / pop recipe details. Defaults to a no-op.
redirectToCatalogyesOpen the Mealz catalog (e.g. “see more recipes”).

Inject​

RecipeDetailsScreen(
    displayRecipe = DisplayRecipe.FromMealzRecipeId("12838"),
    serves = servesFromCallback, // forward goToRecipeDetails serves as-is
    navigationCallback = RecipeDetailsNavigationCallback(
        redirectToLogIn = { },
        redirectToStoreLocator = { },
        exit = { },
        redirectToCatalog = { /* open CatalogScreen */ }
    )
)