isCurrent property

bool isCurrent

Whether this route is the top-most route on the navigator.

If this is true, then isActive is also true.

Implementation

bool get isCurrent {
  if (_navigator == null) {
    return false;
  }
  final _RouteEntry? currentRouteEntry = _navigator!._lastRouteEntryWhereOrNull(_RouteEntry.isPresentPredicate);
  if (currentRouteEntry == null) {
    return false;
  }
  return currentRouteEntry.route == this;
}