prefetchAssets method
Pre-warm the native asset cache for the given local identifiers so the next scanSingleAsset or library scan can decode them with less I/O pressure. Default no-op — platforms without a meaningful warm-cache implementation just return.
Implementation
@override
Future<void> prefetchAssets(
List<String> localIdentifiers, {
String? modelId,
}) async {
if (localIdentifiers.isEmpty) return;
try {
await _methodChannel.invokeMethod<void>(
'prefetchAssets',
{
'localIds': localIdentifiers,
if (modelId != null) 'modelId': modelId,
},
);
} on MissingPluginException {
// No-op: platforms without a warm-cache impl just skip prefetching.
}
}