handleFailure method

void handleFailure({
  1. required Socket socketInfo,
  2. MacWebViewBrowser? macWebview,
  3. Webview? linuxWebview,
})

Implementation

void handleFailure({
  required Socket socketInfo,
  MacWebViewBrowser? macWebview,
  Webview? linuxWebview,
}) {
  debugPrint("failure called");
  sl<WebSocketService>().dispose();
  sl<ApiService>().sendConnectionStatus(
    status: ConnectionStatus.userClosed,
    socketUrl: socketInfo.url,
    requestId: socketInfo.requestId,
  );
  sl<NavigationService>().popAll();
  macWebview?.close();
  linuxWebview?.close();
  sl<EztoResultService>().onError(ErrorCode.serverError);
  sl<EztoResultService>().onClose(CloseReason.transactionCompleted);
}