addThirdPartyNotices function

void addThirdPartyNotices(
  1. String package,
  2. List<ThirdPartyNotice> notices
)

Adds notices to Flutter's licence page under package.

Implementation

void addThirdPartyNotices(String package, List<ThirdPartyNotice> notices) {
  LicenseRegistry.addLicense(
    () => Stream.fromIterable([
      for (final n in notices)
        LicenseEntryWithLineBreaks([
          package,
        ], '${n.name}\n\n${n.usedFor}\n\n${n.text}'),
    ]),
  );
}