struct ContentView: View {
    @State private var names = ["Stewart", "Emily"]
    @State private var newName = ""
    @FocusState private var isFosused:Bool
    var body: some View {
        NavigationView {
            List() {
                ForEach($names, id:\.self) { $name in
                    TextField(name, text: $name)
                        .focused($isFosused, equals: true)
                        .textFieldStyle(.roundedBorder)
                        
                }
            }
            .navigationTitle("Name list")
            .navigationBarItems(
                trailing:
                    Button {
                        names.append("")
                    } label: {
                        Image(systemName: "plus.circle.fill")
                    }
            )
        }
        .toolbar {
            ToolbarItemGroup(placement: .keyboard) {
                HStack {
                    Spacer()
                    Button {
                        isFosused = false
                    } label: {
                        Image(systemName: "keyboard.chevron.compact.down")
                    }
                }
            }
        }
    }
}