processRouteRawRequest method

bool processRouteRawRequest(
  1. List<ParamExtractor> positionalArgumentsFunctions,
  2. Map<Symbol, ParamExtractor> namedArgumentsFunctions,
  3. ParameterMirror singleParam
)

Implementation

bool processRouteRawRequest(
  List<ParamExtractor> positionalArgumentsFunctions,
  Map<Symbol, ParamExtractor> namedArgumentsFunctions,
  ParameterMirror singleParam,
) {
  bool isRequestEntity = singleParam.type.reflectedType == RequestEntity;

  if (isRequestEntity) {
    extractor(RequestEntity request) => request;

    if (singleParam.isNamed) {
      namedArgumentsFunctions[singleParam.simpleName] = extractor;
    } else {
      positionalArgumentsFunctions.add(extractor);
    }
  }
  return isRequestEntity;
}