MapEntry<int, AppPage>? getPageWithIndex(AppRoute route) { try { final page = asMap().entries.lastWhere((e) => e.value.route == route); return page; } catch (_) { return null; } }