htmlResponse function
Answers with markup as an HTML document.
The charset is stated, since a browser guessing at encoding is a rendering bug waiting to happen.
Implementation
Response htmlResponse(String markup, {int status = 200}) {
return Response(
status,
body: markup,
headers: const {'content-type': 'text/html; charset=utf-8'},
);
}