createFile function

File createFile({
  1. required String path,
  2. required String name,
  3. required String command,
  4. required Sample sample,
  5. String? folderName,
})

Implementation

File createFile({
  required String path,
  required String name,
  required String command,
  required Sample sample,
  String? folderName,
}) {
  final fileModel = Structure.feature(
    name,
    folderName: folderName ?? '',
    wrapperFolder: folderName != null,
  );
  String fullPath = '$path${fileModel.path}_$command.dart';
  sample.path = fullPath;
  return sample.create();
}