init(_:isInserted:content:)
Creates a menu bar extra with a key for a localized string to use as the label. The item will be displayed in the system menu bar when the specified binding is set to true. If the user removes the item from the menu bar, the binding will be set to false.
Declaration
nonisolated init(_ titleKey: LocalizedStringKey, isInserted: Binding<Bool>, @ViewBuilder content: () -> Content)Parameters
- titleKey:
The title key to use for the label of the item.
- isInserted:
Whether the item is inserted in the menu bar. The item may or may not be visible, depending on the number of items present.
- content:
A
Viewto display when the user selects the item.