hasDocument property
bool
get
hasDocument
True if the body is not empty and the Content-Type
is application/vnd.api+json
Implementation
bool get hasDocument =>
body.isNotEmpty &&
(headers['Content-Type'] ?? '').toLowerCase().startsWith(mediaType);