pngResponse static method
Return a response containing a PNG image.
Implementation
static Response pngResponse({BaseRequest? request}) {
final headers = {
'content-type': 'image/png',
'content-length': '${_pngImageData.length}'
};
return Response.bytes(_pngImageData, 200,
request: request, headers: headers, reasonPhrase: 'OK');
}