GenerativeMediaResolver class final

The real GenerativeResolver: produces every declared generative source through ai_abstracted before the frame loop, caches it on disk by prompt + seed + params, and serves the produced file-backed source synchronously.

Install it with fluvieGenerativeResolver (or pass it to a render). It is idempotent and honors the config's offline switch and generation budget.

Constructors

GenerativeMediaResolver({required GenerativeConfig config, GenerativeCache? cache, ProviderRegistry registry = const ProviderRegistry(), Client? httpClient, GenerateFn? generate})
Creates a resolver over config. cache, registry, httpClient, and generate are injectable; by default it caches under the config dir and calls ai_abstracted through a ProviderRegistry.
GenerativeMediaResolver.fromEnv(Map<String, String> env, {Client? httpClient})
Builds a resolver reading credentials and settings from env.
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

audioFor(GenerativeSource source) → AudioSource
The resolved file-backed AudioSource for a produced audio source (music, speech, or sound effect) — synchronous by contract.
generateAll(Iterable<GenerativeSource> sources, {void onProgress(GenerativeProgress progress)?}) Future<void>
Produces every source in sources (cache hit or generate) so that mediaFor, audioFor, and metaFor can answer synchronously afterwards.
mediaFor(GenerativeSource source) → MediaSource
The resolved file-backed MediaSource for a produced visual source (image or video) — synchronous by contract.
metaFor(GenerativeSource source) → GeneratedAssetMeta
The probed GeneratedAssetMeta for produced source — synchronous by contract, so the timeline can read a clip's duration and audio flag.
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