Skip to main content
Version: 5.6

Empty

Empty Page

To create your own Empty page, you create a class that implements BaseEmptyComponent.

import SwiftUI
import MealziOSSDK

@available(iOS 14, *)
public struct MyCustomEmptyView: EmptyProtocol {
public func content(params: BaseEmptyParameters) -> some View {
// your implementation here
}
}

with

public struct BaseEmptyParameters {
/// An closure for pages that need to redirect on empty (like empty favorites, myMeals)
public let onOptionalCallback: (() -> Void)?