hasResponse property

bool get hasResponse

Check if a response context is currently available

Implementation

static bool get hasResponse {
  return ServerContext.hasContext && ServerContext.current.response != null;
}