buildModelFile static method
create model file using requestModel and response
Implementation
static Future<void> buildModelFile({
required RequestModel requestModel,
required dynamic response,
}) async {
await FolderAndFileService.createFile(
FolderPaths.instance
.modelFile(requestModel.modelName, requestModel.featureName),
convertMapToClassModel(
name: requestModel.modelName,
response: response is Map ? response : response[0],
),
);
print("✅ Create ${requestModel.modelName} file successfully ...\n\n");
}