FreedomeClient class final

Client of one dome's media server (L3) over the public API v1 (L4).

Constructors

FreedomeClient({required FreedomeEndpoint endpoint, FreedomeCredentials credentials = const GuestCredentials(), FreedomeClientOptions options = const FreedomeClientOptions(), TokenStore? tokenStore, CacheStore? cache, PinStore? pinStore, OutboxStore? outbox, FreedomeLogger? logger, FreedomeTransportFactory? transports, Random? random})
Creates a client; call open before using the repositories.

Properties

audio ↔ AudioRepository
Audio of the default venue (audio.venue(id) for others): state, zones, devices, presets, sessions, generator (02f §6, 03f 3.SDK.2).
latefinal
audioReactive ↔ AudioReactiveRepository
Live analysis, AudioReactive scenes and texture sources of the default venue (audioReactive.venue(id) for others).
latefinal
cache → CacheStore
Offline read cache (in-memory by default).
final
calibration ↔ CalibrationRepository
Calibration jobs.
latefinal
clients ↔ ClientsRepository
Client-device registration and telemetry (02e §5.6).
latefinal
content ↔ ContentRepository
Assets, uploads, shows.
latefinal
credentials → FreedomeCredentials
Credentials used by open.
final
degradedReason → String?
Why the state is degraded / offline (for UIs), or null.
no setter
endpoint → FreedomeEndpoint
The endpoint (with the dome id once GET /info answered).
no setter
engine ↔ EngineRepository
Displays / engine outputs, test patterns, engine status.
latefinal
gateways ↔ GatewaysRepository
Gateways and drivers of this server, such as resolume.
latefinal
graphql ↔ GraphqlClient
GraphQL queries / mutations over HTTP (/api/v1/graphql; aggregated reads for dashboards).
latefinal
hashCode → int
The hash code for this object.
no setterinherited
logger → FreedomeLogger?
Log sink.
final
options → FreedomeClientOptions
Options.
final
osc ↔ OscRepository
Server-mediated OSC.
latefinal
outbox → OutboxStore?
Offline write queue (null = writes fail while offline).
final
outboxOutcomes → Stream<OutboxOutcome>
Results of writes replayed from the outbox after a reconnect (409 → ConflictException with the latest).
no setter
pinStore → PinStore
TLS pins by dome id (TOFU; in-memory by default — persist it in apps).
final
playback ↔ PlaybackRepository
Players: state + transport controls.
latefinal
realtimeTransport → RealtimeTransport?
The realtime transport in use (null while realtime is down).
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
server → ServerInfo?
GET /api/v1/info of the connected server (null before open).
no setter
session → Session
Current session.
no setter
sessions → Stream<Session>
Session changes (login, refresh, logout).
no setter
state → ConnectionState
Current connection state.
no setter
states → Stream<ConnectionState>
Connection state changes.
no setter
tokenStore → TokenStore
Token persistence.
final
venues ↔ VenuesRepository
Venues (geometry, displays, calibration files, .dome import / export).
latefinal

Methods

close() → Future<void>
Closes the client (idempotent); repositories must not be used afterwards.
enterBackground() → void
The app went to the background: realtime closes after backgroundGrace (02f §7.3, mobile OS limits).
events({Set<String> topics = const {'#'}}) → Stream<FreedomeEvent>
Events of topics (MQTT filters; default all the caller may see). Survives reconnects.
logout() → Future<void>
Logs out (password / pairing / cloud sessions: DELETE /auth/session) and forgets stored tokens.
networkAvailable() → void
The OS reports the network is back: retry now (resets the backoff).
networkLost() → void
The OS reports the network is gone: realtime will fail anyway → offline at once.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
open() → Future<void>
Connects: GET /info → API major check → authentication → realtime. Throws IncompatibleServerException, UnauthorizedException, NetworkException …; the state reflects the outcome. A realtime failure does not throw: the client is then degraded and keeps retrying in the background.
request(ApiOperation op, {Map<String, String> params = const {}, Map<String, String> query = const {}, Object? body, String? ifMatch}) → Future<Object?>
Escape hatch for operations without a repository method (new contract minors): sends op and returns the decoded JSON body (null for 204 / empty).
resume() → void
The app is in the foreground again: reconnect + resync immediately.
send(ApiOperation op, {Map<String, String> params = const {}, Map<String, String> query = const {}, Object? body, Uint8List? bytes, String? contentType, Map<String, String> headers = const {}, Duration? timeout}) → Future<FreedomeResponse>
Sends op through the client's pipeline (auth, refresh, idempotency key, timeouts, problem mapping) and returns the raw response — for extension packages (freedome_admin) and binary bodies.
supports(String capability) → bool
Whether the server announces capability: a dotted path into info.capabilities (truthy value / non-empty list or object), or transport.<name> for info.transports.
toString() → String
A string representation of this object.
inherited

Operators

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