DropletWidgetComposition
The single and the split composition of one widget, of which the host draws the one the mount is (DroppyKit 1.23.0).
@MainActor struct DropletWidgetComposition<Single, Split> where Single : View, Split : View
Picked by mode, not by measuring: the shelf sizes the card from your declaration, so the composition is decided before the first frame. Inside each, lay rows out to fit (ShelfWidgetRows).
DropletWidgetComposition {
ShelfWidgetScaffold("Disks", systemImage: "internaldrive") { allDisks }
} split: {
ShelfWidgetScaffold("Disks", systemImage: "internaldrive") { busiestDisk }
}Available from DroppyKit 1.23.0.
Initializers
init(single:split:)
@MainActor init(@ViewBuilder single: () -> Single, @ViewBuilder split: () -> Split)
Creates the two compositions.
Properties
body
@MainActor var body: some View { get }