updateUploadProgress static method

dynamic updateUploadProgress(
  1. int? id,
  2. int? idList,
  3. int progress
)

Implementation

static updateUploadProgress(int? id, int? idList, int progress) async {
  print(id);
  PersonChat getChat = chat.where((element) => element.id == id && element.listId == idList).first;
  getChat.chatType.progress = progress;
  if (progress >= 100) {
    getChat.chatType.status = 1;
  }
  await ChatDatabase.progressUploadUpdate(id: id.toString(), progress: progress, idList: idList);
}