createPathForDartFile static method

String createPathForDartFile({
  1. required String folderPath,
  2. required String className,
  3. String? prefix,
  4. String? creationPath,
})

Create a file path.

Implementation

static String createPathForDartFile(
    {required String folderPath,
    required String className,
    String? prefix,
    String? creationPath}) {
  if (prefix != null) {
    prefix = "_" + prefix;
  } else {
    prefix = "";
  }
  return '$folderPath/${creationPath != null ? '$creationPath/' : ''}${className.snakeCase}$prefix.dart';
}