registerAssetLicense function

void registerAssetLicense(
  1. List<String> packages,
  2. String assetKey, {
  3. AssetBundle? bundle,
})

Adds assetKey's text under packages to LicenseRegistry; it is read only when a page lists licences.

Implementation

void registerAssetLicense(
  List<String> packages,
  String assetKey, {
  AssetBundle? bundle,
}) {
  LicenseRegistry.addLicense(
    () => assetLicense(bundle ?? rootBundle, packages, assetKey),
  );
}