createRouteArgs function
Map<String, Expression>
createRouteArgs({
- required ServerRoute route,
- ServerReturnType? returnType,
- String? classVarName,
- String? method,
- MetaWebSocketMethod? webSocket,
- List<
Code> additionalHandlerCode = const [],
Implementation
Map<String, Expression> createRouteArgs({
required ServerRoute route,
ServerReturnType? returnType,
String? classVarName,
String? method,
MetaWebSocketMethod? webSocket,
List<Code> additionalHandlerCode = const [],
}) {
return {
...createModifierArgs(annotations: route.annotations),
if (method != null) 'method': literalString(method),
if (createHandler(
route: route,
returnType: returnType,
classVarName: classVarName,
webSocket: webSocket,
additionalHandlerCode: additionalHandlerCode,
)
case final handler?)
'handler': handler,
};
}