Skip to main content
Version: 5.0

Equipment

This template allows you to customize the Equipment section of the Preferences page.

import SwiftUI
import mealzcore
import MealziOSSDK

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

Params

public struct PreferencesEquipmentParameters {
/// The differerent types of equipment (like Oven)
public let equipmentsTag: [CheckableTag]
/// Whether or not all options are available to be seen
@Binding public var isExpanded: Bool
/// Boolean indicating if the input is a checkbox (multiple options) or radioButton (one option)
public let typeOfInput: TypeOfInput
/// A closure that selects this diet option. Multiple options can be selected at the same time
public let onTogglePreference: (String) -> Void