text method

Response text(
  1. String body, {
  2. int statusCode = 200,
  3. Map<String, Object>? headers,
})

Returns a text response.

Implementation

Response text(
  String body, {
  int statusCode = 200,
  Map<String, Object>? headers,
}) {
  return Response(
    statusCode,
    body: body,
    headers: {'content-type': 'text/plain', ...?headers},
  );
}