class NavigationContext
An abstract class that encapsulates the current location within the application navigation stack, part of the global application context.
abstract class NavigationContext extends ObservableObject;
Notes
- An instance of this class is available as app.navigation, set by the platform-specific renderer package.
- This object contains the current location, represented as a path string.
- When a new path is set, a
Setchange event is emitted.
Type members
type NavigationContext.NavigationMode static
Type definition for an object supported by app.navigate() and NavigationContext.navigateAsync() that indicates how a new location should be applied.
Instance members
path
The current navigation path, read-only.navigateAsync() abstract
Navigates to the specified path.set()
Sets the current navigation path.resolve()
Resolves a relative path against the current navigation path.clear()
Resets the current path silently without activating or deactivating any activities.
Inherited members
emit()
Emits an event, immediately calling all event handlers.emitChange()
Emits a change event.listen()
Adds a handler for all events emitted by this object.listenOnce()
Returns a promise for a single event with the provided name.listenAsync()
Adds a handler for all events emitted by this object, and returns an async iterable.observe()
Observes a property, a bound property from an attached parent, or an observable object.observeAsync()
Observes one or more targets asynchronously, batching or debouncing/throttling updates.attach() protected
Attaches the specified observable object to this object.isUnlinked()
Returns true if the object has been unlinked.unlink()
Unlinks this observable object.beforeUnlink() protected
A method that’s called immediately before unlinking an object, can be overridden.
