generateAll method
Future<void>
generateAll(
- Iterable<
GenerativeSource> sources, { - void onProgress(
- GenerativeProgress progress
override
Produces every source in sources (cache hit or generate) so that
mediaFor, audioFor, and metaFor can answer synchronously afterwards.
Runs before the first frame and is idempotent: producing the same source
(by GenerativeSource.cacheKey) twice does the work once. Reports coarse
progress through onProgress. Throws a FluvieGenerativeException when a
source cannot be produced (provider error, offline cache miss, or budget).
Implementation
@override
Future<void> generateAll(
Iterable<GenerativeSource> sources, {
void Function(GenerativeProgress progress)? onProgress,
}) async {
if (sources.isNotEmpty) {
throw FluvieGenerativeException(
'No generative backend is installed (got ${sources.length} source(s), '
'first: "${sources.first}"). $_install',
);
}
}