ServerParam.fromMeta constructor

ServerParam.fromMeta(
  1. MetaParam param
)

Implementation

factory ServerParam.fromMeta(MetaParam param) {
  final importPath = ServerImports.fromElement(param.type.element);
  final paramAnnotations = ServerParamAnnotations.fromMeta(param);
  final type = ServerType.fromMeta(param.type);

  return ServerParam._(
    name: param.name,
    type: type,
    isRequired: param.isRequired,
    isNamed: param.isNamed,
    defaultValue: param.defaultValue,
    hasDefaultValue: param.hasDefaultValue,
    importPath: importPath,
    annotations: paramAnnotations,
    argument: null,
  );
}