WebModelSourceResolver class
Resolves the active inference model from WebModelManager into the
correct WebModelSource subtype based on ServiceRegistry
useStreamingStorage and the resolved path prefix. This is the
single piece of code that decides blob-URL vs OPFS-stream — both
WebInferenceModel (MediaPipe) and LiteRtLmWebInferenceModel
(@litert-lm/core) consume it.
Constructors
- WebModelSourceResolver.forActiveModel()
-
Builds a resolver backed by a fresh
WebModelManager, which rehydrates the active model from persisted prefs. Lets an engine package construct the resolver without aFlutterEdgeAiWebinstance.factory
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
activeInferenceSpec(
) → Future< InferenceModelSpec> - The active inference model's spec, after the persisted identity has been restored.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
resolveActiveInferenceModel(
) → Future< ({String? loraPath, WebModelSource model})> -
Resolves the active inference model. Returns the source plus the
installed LoRA path if any (only meaningful for MediaPipe; LiteRT-LM
throws on
loraPath). -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited