jsonResponse method
Creates a JSON response with proper headers.
Implementation
Response jsonResponse(
String body, {
int statusCode = 200,
Map<String, String> additionalHeaders = const {},
}) {
return Response(
statusCode,
body: body,
headers: {
'content-type': 'application/json; charset=utf-8',
...additionalHeaders,
},
);
}