checkAndCreateHTMLFile function

dynamic checkAndCreateHTMLFile(
  1. String fileName,
  2. String path
)

Implementation

checkAndCreateHTMLFile(String fileName, String path) async {
  if (!checkFile(fileName, path)) {
    final File pageFile =
        File(<String>{path, 'www', fileName}.join(Platform.pathSeparator));

    await pageFile.create(recursive: true);
    String html = await rootBundle.loadString('assets/uxp/$fileName');
    await pageFile.writeAsString(html);
    return;
  }
}