textResponse function

Response textResponse(
  1. String content, {
  2. int status = 200,
})

Create a plain text response

Implementation

Response textResponse(String content, {int status = 200}) {
  return Response(
    status,
    headers: {
      'Content-Type': 'text/plain; charset=utf-8',
    },
    body: content,
  );
}