removeAttachmentById method
Remove the attachment with the given attachmentId
.
Implementation
void removeAttachmentById(String attachmentId) {
final attachment = value.firstWhereOrNull(
(attachment) => attachment.id == attachmentId,
);
if (attachment == null) return;
removeAttachment(attachment);
}