NavigationService class

Centralized navigation service for programmatic navigation Prevents navigation issues and provides type-safe navigation

Constructors

Properties

currentContext BuildContext?
no setter
hashCode int
The hash code for this object.
no setterinherited
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

canPop() bool
Check if can pop
goBack<T>([T? result]) → void
Pop current route
Navigate and remove all previous routes
Replace current route
Navigate to a named route
Pop all routes and navigate to new route
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
popUntil(String routeName) → void
Pop until specific route
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Properties

final