Response.text constructor

Response.text({
  1. required int statusCode,
  2. dynamic data,
  3. Map<String, String> headers = const {HttpHeaders.contentTypeHeader : 'text/plain'},
})

Implementation

Response.text({
  required this.statusCode,
  this.data,
  this.headers = const {
    HttpHeaders.contentTypeHeader: 'text/plain',
  },
}) : contentType = 'text/plain';