StreamResponse.fromStrings constructor
StreamResponse.fromStrings(})
Response that writes the strings
to the response.
Implementation
factory StreamResponse.fromStrings(
Stream<String> strings, {
statusCode = 200,
Map<String, dynamic>? headers,
String? mimeType,
String? charset,
cnv.Encoding encoding = cnv.utf8,
List<Cookie>? cookies,
}) {
return StreamResponse(
body: strings.transform(encoding.encoder),
statusCode: statusCode,
headers: headers,
mimeType: mimeType,
charset: charset,
cookies: cookies,
);
}