RuntimeHandle class final
Owner of one native handle.
A runtime owns maps and the network and cache settings that they share.
See mln_runtime in the
C API reference.
- Implemented types
Properties
- discarding → RuntimeHandleDiscarding
-
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- id → int
-
The native handle id, which runtime events report as their source.
no setter
- isClosed → bool
-
Whether the binding has accepted a release, dispose, or discard of
this handle.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
clearEventHandler(
) → Future< CommandCompletion> - Stops sending the events of the runtime and its maps to a callback.
-
clearHttpHeaderTransform(
) → Future< CommandCompletion> - Stops adding headers to the runtime's HTTP requests.
-
clearResourceProvider(
) → Future< CommandCompletion> - Removes the runtime's resource provider, so the library loads every request itself.
-
clearResourceTransform(
) → Future< CommandCompletion> - Stops rewriting the URLs of the runtime's network requests.
-
createMap(
MapOptions options) → MapHandle -
Creates a map on
runtime. -
createOfflineRegion(
OfflineRegionDefinition definition, Uint8List metadata) → Future< OfflineRegionInfo> - Creates an offline region in the runtime's cache file.
-
deleteOfflineRegion(
int regionId) → Future< void> -
Deletes the offline region
regionIdfrom the runtime's cache file. -
dispose(
) → void - Releases a runtime in any state, without waiting.
-
getOfflineRegion(
int regionId) → Future< OfflineRegionInfo?> -
Reads the offline region
regionId. -
getOfflineRegionStatus(
int regionId) → Future< OfflineRegionStatus> -
Reads the download progress of the offline region
regionId. -
invalidateOfflineRegion(
int regionId) → Future< void> -
Makes maps check each resource of the offline region
regionIdwith the server before they use it. -
listOfflineRegions(
) → Future< List< OfflineRegionInfo> > - Lists the offline regions in the runtime's cache file.
-
mergeOfflineRegions(
String sideDatabasePath) → Future< List< OfflineRegionInfo> > - Copies the offline regions of another cache file into the runtime's cache file.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
release(
) → Future< void> - Releases a runtime.
-
runCacheDatabaseOperation(
CacheDatabaseOperation operation) → Future< void> - Runs a maintenance action on the runtime's cache database.
-
setEventHandler(
RuntimeEventHandler handler) → Future< CommandCompletion> - Sends the events of the runtime and its maps to a callback.
-
setHttpHeaderTransform(
HttpHeaderTransform transform) → Future< CommandCompletion> - Adds headers to the runtime's HTTP requests.
-
setMaximumAmbientCacheSize(
int size) → Future< void> - Limits the size of the runtime's ambient cache.
-
setOfflineRegionDownloadState(
int regionId, OfflineRegionDownloadState state) → Future< void> -
Starts or pauses the download of the offline region
regionId. -
setOfflineRegionObserved(
int regionId, RuntimeEventFlag events) → Future< void> -
Selects the events that the runtime reports about the download of the
offline region
regionId. -
setResourceProvider(
ResourceProvider provider) → Future< CommandCompletion> - Serves the runtime's network requests through a callback.
-
setResourceTransform(
ResourceTransform transform) → Future< CommandCompletion> - Rewrites the URLs of the runtime's network requests.
-
toString(
) → String -
A string representation of this object.
override
-
updateOfflineRegionMetadata(
int regionId, Uint8List metadata) → Future< OfflineRegionInfo> -
Replaces the metadata of the offline region
regionId.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
create(
{RuntimeOptions? options}) → RuntimeHandle - Creates a runtime.