getActive method
Get the active widget from the router. You may want this to be your initial widget when your app starts.
Implementation
Widget getActive() {
var isHistoryEmpty = _history.isEmpty;
var findWidgetByIndex = isHistoryEmpty ? _pages[0] : _pages[_history.last];
return findWidgetByIndex;
}