Attachment class final
A file (such as an image or document) attached to a feature in a ServiceFeatureTable or a GeodatabaseFeatureTable.
Attachments allow you to associate files containing additional information with specific, relevant features. For example, a building inspector could attach a PDF of a permit to a building feature. Attachments are not stored as attributes, rather the attachment data is linked with the feature inside its ServiceFeatureTable or a GeodatabaseFeatureTable.
If a feature table supports attachments (ArcGISFeatureTable.hasAttachments), each feature in the table may have zero or more attachments. Get a feature's collection of attachments by calling ArcGISFeature.fetchAttachments. You can examine an attachment's name, type, and file size, and download the file using Attachment.fetchData. Once downloaded, you can work with the data in your app (display it to the user, for example).
If a feature allows editing of its attachments (ArcGISFeature.canEditAttachments value is true), you can add to the feature's collection of attachments using ArcGISFeature.addAttachment. The data must be in one of the supported attachment formats. You can also update or delete attachments from the ArcGISFeature, as required.
Your app's available memory and storage space may impact the size of attachments you can add to a feature, or retrieve from the feature's collection. Apps that need to work with large attachments should be tested using representative physical devices and sample attachments.
- Implemented types
Properties
- contentType → String
-
The content type of the attachment.
no setter
- hasFetchedData → bool
-
True if the attachment data has been retrieved, false otherwise.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- id → int
-
The id of the attachment.
no setter
- name → String
-
The name of the attachment.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- size → int
-
The size of the attachment's data in bytes.
no setter
Methods
-
fetchData(
) → Future< Uint8List> - Fetches the attachment's data.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited