Common topic

Provides lightweight, reusable building blocks and value objects used across the Magic Lane Maps SDK for Flutter. Use this module to manage global SDK lifecycle, error handling, typed parameter containers, progress tracking, versioning, and compact value objects for routing and transfer statistics. These primitives power higher-level services (routing, navigation, content management, search) and make it easy to pass structured data and monitor asynchronous operations consistently.

  • GemKit: The global SDK entrypoint. Use GemKit to initialize and release the Magic Lane SDK and to configure global options such as automatic content updates during startup.
  • AutoUpdateSettings: Configuration model that controls which content types are checked and updated automatically. Provide this when initializing the SDK to enable or disable automatic updates for maps, styles, voices, and resources.
  • GemError: Standardized error enum used across the SDK. Inspect this value after operations to determine success or detailed failure reasons.
  • ApiErrorService: Central place to read the last API error and register for error updates. Use this to retrieve or subscribe to the most recent SDK error when a method does not return an explicit error value.
  • GemParameter: Typed key/value parameter used throughout the SDK to represent arbitrary metadata used by many SDK components.
  • ParameterList: Iterable container for GemParameter instances. Use it to collect parameter sets, convert them to Dart lists, or produce deep JSON structures ready for inspection.
  • SearchableParameterList: Extension of ParameterList with convenience search helpers. Use it to find parameters by key, fetch display names, or retrieve parameter objects by identifier.
  • ProgressListener: Abstract interface for tracking progress and completion of long-running operations. Many async SDK operations return or accept progress listeners so you can monitor progress, cancel work, and receive completion callbacks.
  • RoadInfo: Small value object describing a road label and its shield classification. Use it to render or interpret road name metadata returned by routing, positioning and instruction APIs.
  • TaskHandler: Lightweight handle for running asynchronous tasks. Returned by many service methods to allow cancellation of in-progress work.
  • TimeDistance: Compact value object separating unrestricted and restricted time/distance components. Obtain this from routing and navigation results to present detailed ETA information.
  • TransferStatistics: Object exposing upload/download/request counters with per-network breakdowns. Request and inspect transfer statistics for specific online services to implement monitoring or quota logic.
  • TurnDetails: Navigation-focused value describing a manoeuvre and its geometry. Use it to obtain schematic geometry, vector/raster images for turn visuals, and event metadata for driving directions.
  • Version: Compact major/minor version holder for content items. Useful when comparing installed versus available content versions.
  • SdkVersion: Deprecated container for SDK version components; present for backwards compatibility and for reading or serializing SDK build details.

The Common components provide consistent data models and control primitives that simplify interaction with the rest of the SDK. Together they reduce boilerplate by standardizing error handling, serialization, progress reporting, and compact data transport.

Classes

ApiErrorService Common
ApiErrorService provides details about the error related to the last operation
AutoUpdateSettings Common
Configuration for auto update
GemKit Common
Magic Lane SDK global functions.
GemParameter Common
A single typed parameter used across the SDK.
ParameterList Common
Searchable parameters list.
Point3d Common
3D point value object.
Point4d Common
4D point / quaternion-like value object.
PositionOrientation Common
Position and orientation pair used by spatial APIs.
ProgressListener Common
Abstract interface for tracking progress of asynchronous operations.
RoadInfo Common
Road information value object.
SdkVersion Common
SDK version container.
SearchableParameterList Common
Searchable parameters list.
TaskHandler Common
A task handler is a reference to a task that is currently running or has been scheduled to run. It can be used to cancel the task.
TimeDistance Common
Time and distance value object used for routing results.
TransferStatistics Common
Provides data transfer statistics for a specific online service.
TurnDetails Common
Provides navigation turn details.
Version Common
Compact major/minor version for content (usually roadmaps).

Enums

GemError Common
Error codes.
NetworkType Common
Network types used when categorizing transfer statistics.
SdkEvent Common
Event which can be triggered at SDK initializaiton
TurnEvent Common
Navigation turn events.
ValueType Common
Types of parameter values supported by the SDK.
ViewOnlineServiceType Common
Online service types for which a view can expose transfer statistics.

Exceptions / Errors

GemKitUninitializedException Common
Exception thrown when GemKit is not initialized
InvalidParameterFormat Common
Exception thrown when a parameter with a given key value does not have the expected format.
MapDisposedException Common
Exception thrown when a call is made on an object that depends on a disposed map.
ObjectNotAliveException Common
Exception thrown when an object is not alive