removeAttachmentWithUri method

AttachmentProperty? removeAttachmentWithUri(
  1. Uri uri
)
inherited

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;
}