Skip to main content
Version: 5.5

OrderHistoryPreviousOrderCard

OrderHistoryPreviousOrderCard

To create your own recipe card template you create a class that implements OrderHistorySuccessOrderDetailRecipeCard

import ai.mealz.sdk.components.orderHistory.success.order.orderDetail.recipeCard.OrderHistorySuccessOrderDetailRecipeCard
import ai.mealz.sdk.components.orderHistory.success.order.orderDetail.recipeCard.OrderHistorySuccessOrderDetailRecipeCardParameters

class MyCustomOrderHistorySuccessOrderDetailRecipeCardImp : OrderHistorySuccessOrderDetailRecipeCard {
@Composable
override fun Content(params: OrderHistorySuccessOrderDetailRecipeCardParameters) {
// your imp here
}
}

with

/**
* A class that holds parameters for the order history success order detail recipe card.
*
* @property recipeTitle The title of the recipe.
* @property recipeGuest The number of guests the recipe is intended for.
* @property recipeImage The URL or path to the recipe image.
* @property isOnSelectionMode Boolean flag indicating if the recipe card is in selection mode.
* @property isInCart Boolean flag indicating if the recipe is already in the cart.
* @property isDisable Boolean flag indicating if the recipe card is disabled.
* @property isSponsor Boolean flag indicating if the recipe is sponsored.
* @property sponsorLogo The URL or path to the sponsor's logo. This can be null.
* @property onClick A callback function to be invoked when the recipe card is clicked.
*/
class OrderHistorySuccessOrderDetailRecipeCardParameters(
val recipeTitle: String,
val recipeGuest: Int,
val recipeImage: String,
val isOnSelectionMode: Boolean,
val isInCart: Boolean,
val isSponsor: Boolean,
val sponsorLogo: String?,
val onClick: () -> Unit
)