isAuthenticated method

bool isAuthenticated({
  1. required String routeName,
})

Implementation

bool isAuthenticated({required String routeName}) {
  final appRoutesService = KiwiContainer().resolve<AppRoutesService>();
  if (!(appRoutesService.isAuthenticated)) {
    if (appRoutesService.protectedRoutesList.contains(routeName)) {
      appRoutesService.unAuthorisedAccessNotifier.add(true);
      return false;
    }
  }
  return true;
}