MultilevelNavigator class

Validates feature configuration and builds the multilevel GoRouter.

Available extensions

Constructors

MultilevelNavigator({required List<FeatureNavigationConfiguration> features, required AuthenticationStateNotifier authenticationStateNotifier, required Widget navigationPanelBuilder(StatefulNavigationShell), Widget authorizedAppScope(Widget child)?, Widget? header, Widget? overlay, RouterParams params = const RouterParams.base()})

Properties

allFeatures → List<FeatureNavigationConfiguration>
latefinal
authenticationStateNotifier → AuthenticationStateNotifier
final
authFeatures → List<FeatureNavigationConfiguration>
final
authorizedAppScope → Widget Function(Widget child)?
final
currentExtra → Object?

Available on MultilevelNavigator, provided by the MultilevelNavigatorExtensions extension

no setter
currentFragment → String

Available on MultilevelNavigator, provided by the MultilevelNavigatorExtensions extension

no setter
currentPath → String
no setter
currentQueryParameters → Map<String, String>

Available on MultilevelNavigator, provided by the MultilevelNavigatorExtensions extension

no setter
features → List<FeatureNavigationConfiguration>
final
hashCode → int
The hash code for this object.
no setterinherited
final
final
latefinal
overlay → Widget?
final
params → RouterParams
final
router ↔ GoRouter
latefinal
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
unauthFeatures → List<FeatureNavigationConfiguration>
final

Methods

addRouteListener(RouteChangeListener listener) → VoidCallback
Returns a function that unsubscribes listener. Each listener keeps its own lastPath in closure so multiple listeners don't interfere.
closeAllModals() → void

Available on MultilevelNavigator, provided by the MultilevelNavigatorExtensions extension

closeModal(String modalId) → void

Available on MultilevelNavigator, provided by the MultilevelNavigatorExtensions extension

Removes modalId from the modal query parameter, dropping the parameter entirely if it was the last one open.
dispose() → void
Called when the owning MultilevelNavigatorScope is disposed.
getCurrentFeatureConfiguration() → CurrentFeatureConfiguration?
Resolves the feature configuration for currentPath, checking authenticated features first, then unauthenticated ones.
getFeatureConfigurationForPath(String path) → CurrentFeatureConfiguration?
Same as getCurrentFeatureConfiguration but for an arbitrary path — used to resolve levels for a feature's cached path while another feature is active (e.g. to preserve BLoC state).
go(String location, {Map<String, String> queryParameters = const <String, String>{}, Object? extra}) → void

Available on MultilevelNavigator, provided by the MultilevelNavigatorExtensions extension

Accepts query parameters both in location and in queryParameters; the latter take precedence on key collision.
goNamed(String name, {Map<String, String> pathParameters = const <String, String>{}, Map<String, String> queryParameters = const <String, String>{}, Object? extra}) → void

Available on MultilevelNavigator, provided by the MultilevelNavigatorExtensions extension

goNamedWithCloseModal(String name, {required List<String> modalIds, Map<String, String> pathParameters = const <String, String>{}, Map<String, String> queryParameters = const <String, String>{}, Object? extra}) → void

Available on MultilevelNavigator, provided by the MultilevelNavigatorExtensions extension

Closes modalIds and navigates to name as a single atomic step.
goNamedWithModal(String name, {required String modalId, Map<String, String> pathParameters = const <String, String>{}, Object? extra}) → void

Available on MultilevelNavigator, provided by the MultilevelNavigatorExtensions extension

Adds modal to the query parameters for name.
goWithModal(String location, {required String modalId, Object? extra}) → void

Available on MultilevelNavigator, provided by the MultilevelNavigatorExtensions extension

Adds modal to the query parameters for location.
isModalOpen(String modalId) → bool

Available on MultilevelNavigator, provided by the MultilevelNavigatorExtensions extension

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
openModal(String modalId) → void

Available on MultilevelNavigator, provided by the MultilevelNavigatorExtensions extension

Opens modalId on the current path. Multiple modals are comma-joined in the modal query parameter.
pushNamed(String name, {Map<String, String> pathParameters = const <String, String>{}, Map<String, String> queryParameters = const <String, String>{}, Object? extra}) → void

Available on MultilevelNavigator, provided by the MultilevelNavigatorExtensions extension

removeRouteListener(RouteChangeListener listener) → void
toString() → String
A string representation of this object.
inherited

Operators

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

Static Properties

restorationId → String
no setter
restorationScopeId → String
no setter