PopupSocketManager constructor

PopupSocketManager(
  1. String username,
  2. String userId,
  3. Map<String, dynamic> metadata,
  4. BuildContext context,
  5. String socketUrl,
  6. String apiUrl,
  7. String clientApiUrl,
  8. AppDatabase database,
  9. String appId,
)

Implementation

PopupSocketManager(
  this.username,
  this.userId,
  // this.domainName,
  this.metadata,
  this.context,
  this.socketUrl,
  this.apiUrl,
  this.clientApiUrl,
  this.database,
  this.appId, // Accept database in constructor
) {
  apiService = ApiService(
      apiUrl, clientApiUrl, database,appId);
  connectToSocket();
  apiService.connectClientApi(userId, username, metadata);
  apiService.getVersion(userId, username, metadata);
  // database.popupDao.deleteAllPopups();
    print('appppid $appId');
  fetchCachedPopups();
}