currentRoute property

Route? get currentRoute

The current (top-most) route, or null if the history is empty.

Implementation

Route? get currentRoute => _history.isNotEmpty ? _history.last : null;