currentChild property

  1. @override
RouteData? currentChild
override

The active child representation of an implementation of this controller

e.g it could be the top-most route of a StackRouter or the child corresponding with activeIndex in TabsRouter

Implementation

@override
RouteData? get currentChild {
  if (_pages.isNotEmpty) {
    return _pages.last.routeData;
  }
  return null;
}