including button to navigation bar in swiftui code example
Example: add navigation bar button swiftui
.navigationBarItems(
leading: Button(action: {
// Actions
}, label: { Text("Button") }),
trailing: Button(action: {
// Actions
}, label: { Image("Icon") })
)