currentConfiguration property

  1. @override
RouteConfig? get currentConfiguration
override

Current route configuration, reported to the Router so the browser address bar reflects navigation on web.

Returns a RouteConfig describing the top-of-stack screen, or null when the stack is empty. See NavigationRouteInformationParser.restoreRouteInformation for the URL serialization.

Implementation

@override
RouteConfig? get currentConfiguration {
  final stack = _controller.currentNavigationStack;
  if (stack.isEmpty) return null;
  return (
    requiredPriorNavigation: const <String>[],
    navigationType: stack.last,
    branchScreenName: _controller.isTabbed
        ? _controller.activeBranchScreenName
        : null,
  );
}