licenses_dart 1.1.0+1 copy "licenses_dart: ^1.1.0+1" to clipboard
licenses_dart: ^1.1.0+1 copied to clipboard

A Dart package for loading and parsing all available SPDX licenses.

example/licenses_dart_example.dart

import 'package:licenses_dart/licenses_dart.dart';

void main() {
  var license1 = License("APACHE-2.0");

  print("Name:\t\t\t${license1.name}");
  print("License ID:\t\t${license1.licenseId}");
  print("Is OSI approved:\t${license1.isOsiApproved}");
  print("Is deprecated:\t\t${license1.isDeprecatedLicenseId}");
  print("See also:\t\t${license1.seeAlso}");

  print("-" * 80);

  var license2Id = "Funky-1.2"; // This license does not exist
  try {
    License(license2Id);
    print("$license2Id: valid");
  } on UnknownLicenseException {
    print("$license2Id: unknown");
  }
}
1
likes
160
pub points
11%
popularity

Publisher

verified publisherjhubi1.com

A Dart package for loading and parsing all available SPDX licenses.

Repository (GitHub)
View/report issues

Topics

#licenses #spdx

Documentation

API reference

License

Apache-2.0 (license)

More

Packages that depend on licenses_dart