resolveAsset<T> function
A convenience for using resolveSources with a single inputId
from disk.
Implementation
Future<T> resolveAsset<T>(
AssetId inputId,
FutureOr<T> Function(Resolver resolver) action, {
PackageConfig? packageConfig,
Future<void>? tearDown,
Resolvers? resolvers,
}) {
return _resolveAssets(
{
'${inputId.package}|${inputId.path}': useAssetReader,
},
inputId.package,
action,
packageConfig: packageConfig,
resolverFor: inputId,
tearDown: tearDown,
resolvers: resolvers,
);
}