getAllPackageConditionsAsPackageInfos2 function

List<PackageInfo2> getAllPackageConditionsAsPackageInfos2()

Implementation

List<PackageInfo2> getAllPackageConditionsAsPackageInfos2() {
  var packageInfos = <PackageInfo2>[];
  for (var i = 0; i < Packages.registeredPackages.length; i++) {
    var package = Packages.registeredPackages[i];
    var packageConditions = package.retrieveAllPackageConditions();
    if (packageConditions != null) {
      for (var j = 0; j < packageConditions.length; j++) {
        packageInfos
            .add(PackageInfo2(package.packageName, packageConditions[j]));
      }
    }
  }
  return packageInfos;
}