getAttachmentById method

Id getAttachmentById(
  1. String id
)

Implementation

Id getAttachmentById(String id) => attachments.singleWhere((element) => !isNullOrEmpty(element.id) && element.id! == id);