renderDataParam method
Handles rendering of data with additional parameters and status code.
This method combines the existing parameters and validators with the provided
data and renders it using the renderData
method.
status
- The HTTP status code to be used for the rendering context. Default is 200.
data
- A map of additional data to be included in the rendering. Default is an empty map.
Returns a Future<String> containing the rendered data as a string.
Implementation
Future<String> renderDataParam({
int status = 200,
Map<String, Object?> data = const {},
}) {
return renderData(
data: {
...getParams(),
...getValidator(),
...data,
},
status: status,
);
}