makePage static method

dynamic makePage(
  1. String className,
  2. String value, {
  3. String folderPath = pagesFolder,
  4. bool forceCreate = false,
})

Creates a new Page.

Implementation

static makePage(String className, String value,
    {String folderPath = pagesFolder, bool forceCreate = false}) async {
  String filePath = '$folderPath/${className.toLowerCase()}_page.dart';

  await _makeDirectory(folderPath);
  await _checkIfFileExists(filePath, shouldForceCreate: forceCreate);
  await _createNewFile(filePath, value);
}