licenses_dart 1.0.0 copy "licenses_dart: ^1.0.0" to clipboard
licenses_dart: ^1.0.0 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("License $license2Id valid");
  } on UnknownLicenseException {
    print("License $license2Id unknown");
  }
}
1
likes
0
pub points
13%
popularity

Publisher

verified publisherjhubi1.com

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

Repository (GitHub)
View/report issues

License

unknown (license)

More

Packages that depend on licenses_dart