import 'package:flutter/foundation.dart'; import 'package:flutter/services.dart'; import 'package:halkyon_app/src/instance/flag_icons_license.dart'; /// Adds Unicode CLDR's notice to the app's licence list, beside the /// packages' own: the subdivisions' names come from it /// (`AssetSubdivisionNames`), and its licence asks that its notice go with /// them. void registerCldrLicense() => LicenseRegistry.addLicense(() async* { yield LicenseEntryWithLineBreaks( const ['Unicode CLDR'], await rootBundle.loadString(cldrLicenseAsset), ); }); /// Where the notice is, among this package's assets: verbatim from the /// release the names come from. const cldrLicenseAsset = 'packages/halkyon_app/assets/subdivisions/LICENSE-CLDR.txt'; /// Adds every notice the package's own assets ask for to the app's licence /// list: the flags' ([registerFlagIconsLicense]) and Unicode CLDR's /// ([registerCldrLicense]). An app calls it once at startup. void registerHalkyonAppLicenses() { registerFlagIconsLicense(); registerCldrLicense(); }