removeAttachmentWithUri method
Removes the attachment with the given uri
, returning it when it was found.
Implementation
AttachmentProperty? removeAttachmentWithUri(Uri uri) {
final match = properties.firstWhereOrNull(
(p) => p is AttachmentProperty && p.uri == uri) as AttachmentProperty?;
if (match != null) {
properties.remove(match);
}
return match;
}