addAttachment method

Future<Attachment> addAttachment({
  1. required String name,
  2. required String contentType,
  3. required Uint8List data,
  4. String keywords = '',
})

Adds a new attachment, with keywords, to this feature.

Throws an error if the feature layer doesn't support the attachment keywords.

Parameters:

  • name — The attachment name.
  • contentType — The type of content.
  • data — The attachment data.
  • keywords — Attachment keywords. The attachment keywords can be accessed using Attachment.keywords.

Return Value: The new Attachment that was added to this feature.