ForgeConfig class

Configuration for one Forge runtime instance.

pluginVersion is SDK-owned build metadata compiled into the native runtime; it is intentionally not configurable here.

Constructors

ForgeConfig({required String accountCode, required String appName, String? buildVariant, String? appReleaseVersion, String? lmaEndpoint, String? analyticsHost, String? userAgent, bool allowLocalHttp = false, bool enableExperiments = false, String? deviceUuid, String? logLevel, int? eventBufferCapacity, int? logBufferCapacity, int? runtimeIngressQueueCapacity, bool processEventsBeforeSessionStart = false, int? preSessionEventQueueLimitEvents, int? preSessionEventQueueMaxAgeMs, int? logoutSessionGuardMs, String? storageDir, String? storagePath, bool autoStartSession = true, Duration diagnosticsDrainInterval = const Duration(seconds: 2)})
const

Properties

accountCode String
NPAW account code the runtime reports to.
final
allowLocalHttp bool
Allows plain-HTTP endpoints for local testing backends.
final
analyticsHost String?
Analytics (NQS) host override. Defaults to lmaEndpoint.
final
appName String
Application name reported with every event.
final
appReleaseVersion String?
final
autoStartSession bool
Starts the app session during NpawForge.start when true.
final
buildVariant String?
final
deviceUuid String?
Caller-provided stable device identity. Native anonymous experiment assignment needs this identifier or a user/profile identity.
final
diagnosticsDrainInterval Duration
Poll cadence for the native diagnostics buffers feeding NpawForge.events and NpawForge.logs. FFI platforms only.
final
enableExperiments bool
Enables asynchronous experiment assignment fetching. Defaults to false.
final
eventBufferCapacity int?
final
hashCode int
The hash code for this object.
no setterinherited
lmaEndpoint String?
FastData endpoint override. Defaults to the production NPAW endpoint.
final
logBufferCapacity int?
final
logLevel String?
One of off, error, warn, info, debug, trace.
final
logoutSessionGuardMs int?
Logout guard window in milliseconds (session-update mode only): after logout() closes the session, the kernel holds the replacement session back for this long so a follow-up loginSuccess attaches its own session directly; events raised inside the window are buffered with their original timestamps. 0 disables the guard. Default 30 000.
final
preSessionEventQueueLimitEvents int?
final
preSessionEventQueueMaxAgeMs int?
final
processEventsBeforeSessionStart bool
final
runtimeIngressQueueCapacity int?
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
storageDir String?
Directory for Forge-owned persistence (remote-config last-good). Pass an app-support directory, e.g. from path_provider's getApplicationSupportDirectory(). Ignored on Flutter Web.
final
storagePath String?
Exact persistence file path; wins over storageDir.
final
userAgent String?
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toNativeConfigJson() Map<String, Object?>
Serializes the native forge_core runtime config JSON. The platform field is stamped by the plugin so pluginInfo reports the Flutter binding.
toString() String
A string representation of this object.
inherited

Operators

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