makeApiService static method

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

Creates a new API service.

Implementation

static makeApiService(String className, String value,
    {String folderPath = networkingFolder, bool forceCreate = false}) async {
  String filePath = '$folderPath/${className.toLowerCase()}_api_service.dart';

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