buildStaticMapperImplementation function
Method
buildStaticMapperImplementation()
Generates the implemented mapper method by the given abstract MethodElement.
Implementation
Method buildStaticMapperImplementation(Map<String, dynamic> config,
MethodElement method, ClassElement abstractMapper) {
return Method(
(b) => b
..name = '_\$${method.name}'
..requiredParameters.addAll(method.parameters.map((e) => copyParameter(e)))
..body = _generateBody(config, method, abstractMapper)
..returns =
refer(method.returnType.getDisplayString(withNullability: true)),
);
}