makeStatefulWidget static method

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

Creates a new Stateful Widget.

Implementation

static makeStatefulWidget(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);
}