jsonResponse function
Create a JSON response
Implementation
Response jsonResponse(Map<String, dynamic> data, {int status = 200}) {
return Response(
status,
headers: {
'Content-Type': 'application/json; charset=utf-8',
},
body: json.encode(data),
);
}