sendJson method
send json encoded String
Implementation
void sendJson(String jsonStr) {
response
..headers.contentType = ContentType.json
..write(jsonStr)
..close();
}
send json encoded String
void sendJson(String jsonStr) {
response
..headers.contentType = ContentType.json
..write(jsonStr)
..close();
}