extractMethodParams function
Implementation
JSONString? extractMethodParams(String filePath, [String? methodName]) {
String? params;
final methods = extractMethodListFromClass(filePath);
if (methodName != null) {
if (!methods.contains(methodName)) {
throw Exception('Method "$methodName" not found in $filePath');
}
params = _extractSingleMethodParams(filePath, methodName);
if (params == null) {
throw Exception('Method "$methodName" not found in $filePath');
}
} else {
methodName = methods.first;
params = _extractSingleMethodParams(filePath, methodName);
}
// print(params);
return JSONStringResult(data: params).toString();
}