getPackages method
Implementation
PackagesCollection getPackages({
bool recursive = true,
bool withRootPackage = true,
}) {
final packagesDirs = getSubDirectories(recursive: recursive);
final targetDirs = [
...packagesDirs,
if (withRootPackage) workdir,
];
final packages =
targetDirs.map(PackageProvider.of).whereType<Package>().toList();
final collection = PackagesCollection(
packages: packages,
);
return collection;
}