headSent method
dart:io does not tell, but its statusCode setter throws a
StateError once the head is out. Only the error path asks.
Implementation
@override
bool headSent(HttpResponse res) {
try {
res.statusCode = res.statusCode;
return false;
} on StateError {
return true;
}
}