Skip to main content
Version: 5.4

ItemSelectorProductOptions

Item Selector Product Options

To create your own Item Selector product options template you create a class that implements ItemSelectorProductOptionsProtocol

import SwiftUI
import mealzcore
import MealziOSSDK

@available(iOS 14, *)
public struct MyCustomItemSelectorProductOptionsView: ItemSelectorOptionProductsProtocol {
public func content(params: ItemSelectorOptionProductsParameters) -> some View {
// your imp here
}
}

with

public struct ItemSelectorOptionProductsParameters {
/// The replacement proucts from different brands
public let products: [Item]
/// A closure that will select this product & navigate back to the Basket
public let onItemSelected: (Item) -> Void
/// A closure to see the details of the item if the retailer provides it
public let onSeeItemDetails: (String) -> Void