removeAllRelatedApiFiles method

void removeAllRelatedApiFiles(
  1. String pathPage,
  2. String pageName,
  3. Map<String, dynamic> pageValue,
  4. bool isReplace,
)

Removes all related API files for a page

pathPage - Page path pageName - Page name pageValue - Page configuration isReplace - Whether to replace files

Implementation

void removeAllRelatedApiFiles(
  String pathPage,
  String pageName,
  Map<String, dynamic> pageValue,
  bool isReplace,
) {
  removeFile(join(pathPage, 'locator.dart'));
  removeFile(join(pathPage, 'mapper.dart'));

  if (isReplace) {
    _removeSpecificApiFiles(pathPage, pageName, pageValue);
  } else {
    _removeAllApiFiles(pathPage);
  }
}