loadBundleInfo static method
Parses library's bundle (once) and maps its shader objects to their
entry names. Null when the library's source is unknown (it was not
loaded through the engine's loaders) or the asset cannot be read.
Implementation
static Future<ShaderBundleInfo?> loadBundleInfo(
gpu.ShaderLibrary library, {
AssetBundle? bundle,
}) {
final cached = bundleInfoFor(library);
if (cached != null) return Future.value(cached);
final pending = _pending[library];
if (pending != null) return pending;
final future = _load(library, bundle ?? rootBundle).whenComplete(() {
_pending[library] = null;
});
_pending[library] = future;
return future;
}