text static method
Implementation
static Response text(String s,
{int status = 200, Headers? headers, Encoding encoding = utf8}) {
final h = headers ?? Headers();
if (!h.has('content-type')) {
h.set('content-type', 'text/plain; charset=${encoding.name}');
}
final data = encoding.encode(s);
return Response(status,
headers: h, body: Stream<List<int>>.value(Uint8List.fromList(data)));
}