writeContentType method

  1. @override
void writeContentType(
  1. Response response
)
override

Sets the content type of the response to 'text/plain' with UTF-8 charset.

This method modifies the headers of the response to include the 'Content-Type' header with the value 'text/plain; charset=utf-8'.

  • Parameter response: The Response object whose headers will be modified.

Implementation

@override
void writeContentType(Response response) {
  response.headers.set('Content-Type', 'text/plain; charset=utf-8');
}