createLicenseContainer static method

Future<LicenseContainer> createLicenseContainer(
  1. String filepath, {
  2. List<String> mediaTypes = const [],
})

Implementation

static Future<LicenseContainer> createLicenseContainer(String filepath,
    {List<String> mediaTypes = const []}) async {
  MediaType? mediaType = await MediaType.ofFile(File(filepath),
      mediaTypes: mediaTypes, fileExtensions: []);
  if (mediaType == null) {
    throw LcpException.container.openFailed;
  }
  return createLicenseContainerForMediaType(filepath, mediaType);
}