Closed huma11farheen closed 4 years ago
@huma11farheen Thank you for reporting. OK, I'll modify it.
@huma11farheen Sorry. Please try to call 'writeStorageListNotNull'.
writeStorageListNotNull(data, "subProfileImages", subProfileImages);
Probably, If use writeStorageListNotNull, it remove a storage field in firestore. Is it expect's result you want?
@hukusuke1007
writeStorageListNotNull(data, "subProfileImages", subProfileImages);
i tried this but this deletes the entire subProfileImages
entity from firebase
@huma11farheen OK, I will modify.
@hukusuke1007 Thank you very much 🙏
@huma11farheen I updated. Please check latest version.
@hukusuke1007 Thank you for updating, i will check 👍
@hukusuke1007 Thank you very much, closing the issue
Description: The updated version allows me to deleted all the images from a list but changes the dataType to null due to which further query to add to list cannot be done. The dataType getting changed to null instead of array when all elements of a list are deleted
code snippets :
//in flamingo (UserDocument)
writeStorageList(data, "subProfileImages", subProfileImages);
//To fetch user Document
final document = await DocumentAccessor() .load<UserDocument>(social.UserDocument(id: userId));
Steps to reproduce:
when updating
document.subProfileImages = []
In Firebase: when images are present:
when the entire list is deleted(updated):
subProfileImages becomes null due to which no further query can be made. @hukusuke1007