SDKServices class
Encapsulates the core services of the Digia Engage SDK.
Immutable and fully built: every field is final and assigned once. Build it with SDKServices.create (the composition root); tests may assemble their own container with the plain constructor.
Constructors
- SDKServices({required LocalStorage storage, required IdentityManager identityManager, required SessionManager sessionManager, required NetworkClient networkClient, required DigiaAnalyticsService analyticsService, required FrequencyManager frequencyManager, required CampaignStore campaignStore, required SubmissionReporter submissionReporter, required SessionReporter sessionReporter, required CaptureSession captureSession, required ComponentRegistryService componentRegistry, required LiveTestService liveTestService, required SessionIdentityWiring sessionIdentityWiring, required LocalStorage captureStorage, SessionLifecycleObserver? sessionLifecycleObserver})
Properties
- analyticsService → DigiaAnalyticsService
-
final
- campaignStore → CampaignStore
-
final
- captureSession → CaptureSession
-
final
- captureStorage → LocalStorage
-
Storage scoped to the
capturedomain (the debug capture profile).final - componentRegistry → ComponentRegistryService
-
final
- frequencyManager → FrequencyManager
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- identityManager → IdentityManager
-
final
- liveTestService → LiveTestService
-
final
- networkClient → NetworkClient
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- sessionIdentityWiring → SessionIdentityWiring
-
The session-and-identity rules; create has already attached them.
final
- sessionLifecycleObserver → SessionLifecycleObserver?
-
Feeds app lifecycle to sessionManager; registered with the binding by
create and removed in dispose. Null when the container was
assembled without one.
final
- sessionManager → SessionManager
-
final
- sessionReporter → SessionReporter
-
final
- storage → LocalStorage
-
final
- submissionReporter → SubmissionReporter
-
final
Methods
-
dispose(
) → void - Releases what this container owns and leaves it inert: the session manager's listeners, analytics and session-report sending, and the network client. Called when the container is replaced, so a retried initialize() does not pile up listeners, timers or clients, and a late call into the old graph sends and writes nothing.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
create(
{required DigiaConfig config, required LocalStorage storage, required NetworkClientFactory networkClient, required void onLiveTestCampaign(LiveTestInvocation invocation), Map< String, dynamic> ? staticContext, int clock()?}) → Future<SDKServices> -
The composition root: builds every service from
configandstorage. Async only to read the static device/app context once, up front, so no service is ever observed half-built.