licenses function

Stream<LicenseEntry> licenses()

Implementation

Stream<LicenseEntry> licenses() async* {
  try {
    var data = await rootBundle.loadString('packages/barcode_scanner/assets/libraries.txt');
    var pattern = '//-------------------------------------------------------------';
    var libraries = data.split(pattern);
    for (var element in libraries) {
      yield FlutterLicense([
        'barcode_scanner'
      ], [
        LicenseParagraph(element, 0)
      ]);
    }
  } catch (e) {
    print(e);
  }}