convertFromHtmlFilePath static method Null safety

Future<File> convertFromHtmlFilePath(
  1. String htmlFilePath,
  2. String targetDirectory,
  3. String targetName

Creates PDF Document from path to File that contains HTML content Can throw a PlatformException or (unlikely) a MissingPluginException converting html to pdf


static Future<File> convertFromHtmlFilePath(String htmlFilePath, String targetDirectory, String targetName) async {
  final generatedPdfFilePath = await _convertFromHtmlFilePath(htmlFilePath);
  final generatedPdfFile = FileUtils.copyAndDeleteOriginalFile(generatedPdfFilePath, targetDirectory, targetName);

  return generatedPdfFile;