isCurrent property

bool isCurrent
inherited

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._history.lastWhere(
    _RouteEntry.isPresentPredicate,
    orElse: () => null,
  );
  if (currentRouteEntry == null)
    return false;
  return currentRouteEntry.route == this;
}