init(_:text:onEditingChanged:)
Creates a text field with a text label generated from a localized title string.
Declaration
nonisolated init(_ titleKey: LocalizedStringKey, text: Binding<String>, onEditingChanged: @escaping (Bool) -> Void)Parameters
- titleKey:
The key for the localized title of the text field, describing its purpose.
- text:
The text to display and edit.
- onEditingChanged:
The action to perform when the user begins editing
textand after the user finishes editingtext. The closure receives a Boolean value that indicates the editing status:truewhen the user begins editing,falsewhen they finish.