NavigationLogic class
A class representing the navigation logic for a Flutter application, using GoRouter.
Manages the routing and screen transitions with integrated feature access control. Handles loading states, authentication, and permission-based redirects.
- Inheritance
-
- Object
- ChangeNotifier
- NavigationLogic
Constructors
- Creates a new NavigationLogic instance with GoRouter.
Properties
- alertController → AlertController?
-
final
- authState → Stream?
-
final
- canGoBack → bool
-
Check if you can navigate back in history
no setter
- canGoUp → bool
-
Check if you can navigate up the route hierarchy (to a parent)
no setter
- currentPath → String
-
Get the current path provided by goRouter instance
no setter
- defaultLoading ↔ Widget Function()?
-
getter/setter pair
- defaultLoadingOverlay ↔ Widget Function()?
-
getter/setter pair
-
defaultMenuItems
→ List<
NavigationItem> ? -
(Optional) default menu items
final
- featureAccessController ↔ FeatureAccessController?
-
getter/setter pair
-
filteredMenuItems
→ List<
NavigationItem> ? -
Filter the defaultMenuItems with featureAccessController available permissions
no setter
- goRouter ↔ GoRouter
-
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setterinherited
- hasListeners → bool
-
Whether any listeners are currently registered.
no setterinherited
- initialiseRoute → void Function(BuildContext context)?
-
Global callback that runs when any route is entered
final
- isLoading ↔ bool
-
Set the loading state of NavigationLogic
getter/setter pair
- parentDepth → int
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- smartBackOrder → SmartBackOrder
-
final
- useSmartBack → bool
-
final
Methods
-
addListener(
VoidCallback listener) → void -
Register a closure to be called when the object changes.
inherited
-
dispose(
) → void -
Discards any resources used by the object. After this is called, the
object is not in a usable state and should be discarded (calls to
addListener will throw after the object is disposed).
override
-
goBack(
{bool? smart}) → void -
goReplace(
SlickRoute path, {Object? extra}) → void - Navigate to a specified route path, replacing the current route
-
goTo(
SlickRoute path, {Object? extra}) → void - Navigate to a specified route path, adding it to the stack
-
goUp(
) → void - Navigate to the parent path, if there is any
-
isReadOnly(
) → Future< bool> - Determine whether the current route has read-only access
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
notifyListeners(
) → void -
Call all the registered listeners.
inherited
-
removeListener(
VoidCallback listener) → void -
Remove a previously registered closure from the list of closures that are
notified when the object changes.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited