run method

  1. @override
void run()
override

Implementation

@override
void run() {
  List<ListeningTo> listeningTo = [];
  if (!getIt.get<AuthenticateService>().shouldBeAuthenticated || getIt.get<AuthenticateService>().authStatus == AuthStatus.authenticated) {
    getIt.get<ListeningHandler>().listeningTo.where((element) => element.ready).forEach((listen) {
      listeningTo.add(
          ListeningTo(
            listenId: listen.listenId,
            route: listen.route,
            params: listen.params,
            clientRequestId: listen.clientRequestId!,
          )
      );
    });
  }
  getIt.get<AbstractIOWsChannel>().sinkAdd(map: PingPong(listeningToRoutes: listeningTo));
}