getPageWithIndex method

MapEntry<int, AppPage>? getPageWithIndex(
  1. AppRoute route
)

Implementation

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