Builder

public struct Builder<LayoutType> where LayoutType : Layout

Used to construct elements that have layout and children.

  • The layout object that is ultimately responsible for measuring and layout tasks.

    Declaration

    Swift

    public var layout: LayoutType
  • Adds the given child element.

    Declaration

    Swift

    public mutating func add(
        traits: LayoutType.Traits = LayoutType.defaultTraits,
        key: AnyHashable? = nil,
        element: Element
    )