getQualifiedFunctionName function
Gets the qualified function name for use in generated code. Returns 'ClassName.methodName' for static methods, or just 'functionName' for top-level functions.
Implementation
String getQualifiedFunctionName(ExecutableElement function) {
final enclosingElement = function.enclosingElement;
if (enclosingElement is InterfaceElement && function.isStatic) {
return '${enclosingElement.name}.${function.name}';
}
return function.name!;
}