ContentStoreItem class Content

A single downloadable content product managed by the ContentStore.

This class models one content product (for example: a map/region, style, or voice pack). Do not construct instances directly; obtain items from the public ContentStore API.

The object exposes identification and localized display text, content type and language, size and downloaded-size metrics, availability/status and progress indicators, preview imagery, additional content-specific parameters and update metadata (version and update size).

Use this object to start/pause/cancel downloads, query state, access previews and delete local content.

Properties

availableSize int
The size in bytes currently available (downloaded) on the client.
no setter
canDeleteContent bool
Whether the local content associated with this item can be deleted.
no setter
chapterName String
Get the product chapter name translated to interface language.
no setter
clientVersion Version
The locally installed Version of the content.
no setter
contentParameters ContentParameters?
Additional content-specific parameters if present.
no setter
countryCodes List<String>
Get the country code (ISO 3166-1 alpha-3) list of the product as text.
no setter
downloadProgress int
Current download progress for this item.
no setter
fileName String
Get the full path to the local content data file when available.
no setter
hashCode int
The hash code for this object.
no setterinherited
hasRegisteredAutoReleaseObject bool
getter/setter pairinherited
id int
Get the unique id of the item in the content store.
no setter
imgPreview Img
Get the image as a Img.
no setter
isCompleted bool
Whether the content item is fully downloaded.
no setter
isImagePreviewAvailable bool
Whether a preview image for this content item is available on the client.
no setter
isUpdatable bool
Whether a newer version of this item is available in the content store.
no setter
language Language
Get the language of the product.
no setter
name String
Get the name of the associated product.
no setter
pointerId int
The pointer ID of the native object
no setterinherited
progressListener ProgressListener?
Returns the currently registered progress listener for this item, if any.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
status ContentStoreItemStatus
Current status of the content item.
no setter
totalSize int
The total size of the content in bytes.
no setter
type ContentType
Get the content type of the product.
no setter
updateItem ContentStoreItem?
Return the ContentStoreItem that represents an in-progress update for this item.
no setter
updateSize int
The size in bytes of an available update for this item.
no setter
updateVersion Version
The Version object describing an available update for this item.
no setter

Methods

asyncDownload(void onComplete(GemError err), {void onProgress(int progress)?, bool allowChargedNetworks = false, DataSavePolicy savePolicy = DataSavePolicy.useDefault, ContentDownloadThreadPriority priority = ContentDownloadThreadPriority.defaultPriority}) ProgressListener
Start or resume an asynchronous download of the content product.
cancelDownload() GemError
Cancel an ongoing download and remove any partially downloaded data.
deleteContent() GemError
Delete the local content data for this item.
dispose() → void
Disposes the native object.
inherited
getContentParametersAs<T extends ContentParameters>() → T?
Typed accessor for contentParameters that avoids explicit casts.
getImagePreview({Size? size, ImageFileFormat? format}) Uint8List?
Retrieve the raw preview bytes for this item if available.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
pauseDownload({void onComplete(GemError)?}) GemError
Pause a running or previously started download.
registerAutoReleaseObject(int pointerId) → void
Registers an object for auto release.
inherited
setProgressListener(void onComplete(GemError err), void onProgress(int progress)?) ProgressListener?
Replace the current progress listener for this item.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited