checkPackageLicense<D> function
Future<D>
checkPackageLicense<D>({
- required DependencyChecker package,
- required LicenseDisplayFunction<
D> licenseDisplay,
Check the license of a single package.
Retruns the formatted license results. Throws a FileSystemException if the necessary files are not found.
Implementation
Future<D> checkPackageLicense<D>({
required DependencyChecker package,
required LicenseDisplayFunction<D> licenseDisplay,
}) async {
return licenseDisplay(
packageName: package.name,
licenseStatus: await package.packageLicenseStatus,
licenseName: await package.licenseName,
);
}