PopupSocketManager constructor
PopupSocketManager(
- String username,
- String userId,
- Map<
String, dynamic> metadata, - BuildContext context,
- String socketUrl,
- String apiUrl,
- String clientApiUrl,
- AppDatabase database,
- 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();
}