buildStaticMethod function
Method
buildStaticMethod(
- MethodElement method,
- ClassElement element
Implementation
Method buildStaticMethod(MethodElement method, ClassElement element) {
final argList = method.parameters.map((e) => copyParameter(e));
final argNameList = method.parameters.map((e) => refer(e.name));
return Method((b) =>
b..static = true
..name = method.displayName
..requiredParameters.addAll(argList)
..body = refer("mapper.${method.displayName}").call(argNameList).code
..returns = refer(method.returnType.getDisplayString(withNullability: true))
);
}