findAssets method
Returns all readable assets matching glob
under the current package.
Implementation
@override
Stream<AssetId> findAssets(Glob glob, {String? package}) {
var packageNode =
package == null ? packageGraph.root : packageGraph[package];
if (packageNode == null) {
throw ArgumentError(
"Could not find package '$package' which was listed as "
'an input. Please ensure you have that package in your deps, or '
'remove it from your input sets.');
}
return glob
.list(followLinks: true, root: packageNode.path)
.where((e) => e is File && !path.basename(e.path).startsWith('._'))
.cast<File>()
.map((file) => _fileToAssetId(file, packageNode));
}