makeStatelessWidget static method

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

Creates a new Stateless Widget.

Implementation

static makeStatelessWidget(String className, String value,
    {String folderPath = widgetsFolder, bool forceCreate = false}) async {
  String filePath = '$folderPath/${className.toLowerCase()}_widget.dart';

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