createPresentation static method

void createPresentation({
  1. required String path,
  2. List<String>? widgets,
  3. List<String>? screens,
  4. required String featureName,
})

Implementation

static void createPresentation({
  required String path,
  List<String>? widgets,
  List<String>? screens,
  required String featureName,
}) {
  if (widgets != null && widgets.isNotEmpty) {
    _createDartFiles(
      widgets
          .map((widget) => '$path/presentation/widgets/${widget}_widget.dart')
          .toList(),
    );

  } else {
    _createDir('$path/presentation/widgets');

  }

  if (screens != null && screens.isNotEmpty) {
    _createDartFiles(
      screens
          .map((screen) => '$path/presentation/screens/${screen}_screen.dart')
          .toList(),
    );
  } else {
    _createDir('$path/presentation/screens');
  }
}