push(_:title:)
Pushes a page onto the Home app’s navigation stack.
Declaration
@MainActor final func push(_ value: some Hashable, title: String? = nil)Parameters
- value:
A value that identifies the page being pushed.
- title:
The title to display in the navigation bar. Pass
nilto leave the title blank.
Discussion
To provide the page’s view, add a matching homeEmbeddedNavigationDestination(for:destination:) modifier to your root view. The Home app manages back navigation.
For example:
context.navigator.push(Route.schedule, title: "Schedule")