ForgePlatform class abstract

Internal seam between the public facade and per-platform runtimes. It traffics in plain Dart maps shaped like the forge_core camelCase JSON contract; the public facade owns the typed models.

Implementers

Constructors

ForgePlatform()

Properties

capturePlans Stream<Map<String, Object?>>
Push stream of kernel capture-plan changes as canonical camelCase plan maps. On Flutter Web the plan is consumed inside @npaw/forge-web itself, so the web stream stays silent.
no setter
commandRequests Stream<Map<String, Object?>>
Push stream of subscribed remote commands as canonical {id, name, args} maps. Delivered once, never replayed.
no setter
events Stream<Map<String, Object?>>
Push streams of drained diagnostic payloads. Implementations own the mechanism (FFI drain timer, Web listener bridge).
no setter
hashCode int
The hash code for this object.
no setterinherited
logs Stream<Map<String, Object?>>
no setter
nativeVersion String?
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

answerCommand(String commandId, bool handled, Map<String, String> details) Future<ForgeOutcome>
Answers a delivered command; the kernel keeps the first answer per id.
applicationForeground(bool foreground) Future<ForgeOutcome>
capturePlan() Future<Map<String, Object?>?>
Pull accessor for the latest kernel-emitted capture plan, or null before the first plan emission (plans emit from the first session start onward).
createVideo(Map<String, Object?>? options, Map<String, Object?>? metadata) Future<ForgePlatformVideo>
destroy() Future<void>
endSession([Map<String, Object?>? params]) Future<ForgeOutcome>
Closes the application session.
experimentsSnapshot() Map<String, Object?>
fetchExperiments() Future<bool>
identityEvent(String kind, Map<String, String> fields) Future<ForgeOutcome>
Reports one typed identity transition. kind is the camelCase kernel identity kind (loginSuccess|loginFailed|logout|profileCreated| profileSelected|profileDeleted); fields carries the recognized userId/profileId/profileType/method/errorCode/reason/userType entries plus extra session-event params, all stringified by the facade.
initialize(ForgeConfig config) Future<void>
Creates the underlying runtime. Throws ForgeInitException on invalid configuration.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
reportNetworkEvent(Map<String, Object?> observation) Future<ForgeOutcome>
sessionUpdate(Map<String, String> params, Map<String, double> metrics) Future<ForgeOutcome>
Hot session update (session-update mode): flat stringified dimension params plus numeric session metrics staged by the kernel and carried on the next session event or an update beat.
setAutoConnectionType(String? connectionType) Future<ForgeOutcome>
Reports the connection class the device is on (wifi, cellular, ethernet, other, unknown), or null to clear it.
setCommandSubscriptions(List<String> names) Future<ForgeOutcome>
Replaces the full set of remote command names the host listens to (replace semantics). Unsubscribed names are auto-answered handled=false by the kernel.
startSession([Map<String, Object?>? params]) Future<ForgeOutcome>
Opens the application session, optionally carrying initial session params (initial dimensions such as screenName or param1..param20).
toString() String
A string representation of this object.
inherited
trackSessionEvent(String name, Map<String, Object?>? params) Future<ForgeOutcome>
trackSessionNavigation([Map<String, Object?>? params]) Future<ForgeOutcome>
Reports a session navigation (sessionnav).

Operators

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