top property

Route? top

Gets the top route in the navigation stack.

Implementation

Route<dynamic>? get top => _history.isNotEmpty ? _history.last : null;