mrs_sdk_flutter library

The official Flutter package for integrating mobile apps with MRS Electronic products and services.

The SpokeZone class is the main entry point for integrating with Spoke.Zone from Flutter apps.

Create a SpokeZone object with SpokeZoneConfig, then use its client surfaces:

Classes

AccessTokenProvider
Contract for supplying the current access token used by API requests.
BackoffStrategy
Strategy used to compute delay for each retry attempt.
DataFilesClient
Client for data file endpoints.
DeviceAuth
Device authentication provider for Spoke.Zone.
DeviceAuthCallbacks
Callback set required for device authentication.
DeviceDetails
Device details returned by devices.get.
DevicesClient
Client for device endpoints.
FixedDelayBackoffStrategy
Fixed-delay retry strategy.
InvalidatableAccessTokenProvider
Access token provider that can invalidate its cached token.
LiveData
MQTT live-data service for publish and periodic telemetry workflows.
LiveDataRegistration
Handle returned by periodic registration APIs.
LiveDataRegistrationStatus
Snapshot of one periodic registration's current status.
LiveDataTransport
Transport abstraction used by LiveData.
LocationData
Geographic location and movement data.
OtaFile
OTA file metadata item returned by otaFiles.list.
OtaFilesClient
Client for OTA file endpoints.
OtaFilesListOptions
Query options for otaFiles.list.
PeriodicTimer
Minimal periodic timer contract used for scheduler injection.
SpokeZone
Spoke.Zone Integration
SpokeZoneConfig
Configuration for creating a SpokeZone client.
UserAuth
User authentication provider for Spoke.Zone.
UserAuthCallbacks
Callback set required for user authentication.

Enums

LiveDataRegistrationState
Registration states for periodic live-data jobs.
SpokeZoneAuthMode
Auth mode used by a SpokeZoneConfig.
SpokeZoneErrorCode
Stable SDK error codes surfaced by public APIs.

Typedefs

AsyncIntCallback = Future<int> Function()
Async integer callback used by auth providers for numeric device identifiers.
AsyncStringCallback = Future<String> Function()
Async string callback used by auth providers.
DelayFn = Future<void> Function(Duration duration)
Delay function used by retry orchestration.
LiveDataPayloadProvider = Future<Map<String, dynamic>?> Function()
Async provider used for periodic JSON payload generation.
LiveDataTransportFactory = LiveDataTransport Function()
Factory for creating a LiveDataTransport instance.
PeriodicTimerFactory = PeriodicTimer Function(Duration interval, void onTick())
Factory for creating periodic timers.
TokenUpdatedCallback = FutureOr<void> Function(String token)
Callback invoked when device auth updates the active token.

Exceptions / Errors

SpokeZoneException
Typed exception used by all public SDK APIs.