authHeader method Null safety

String? authHeader(
  1. String scheme
)

Returns auth header for the requested scheme.

Implementation

String? authHeader(String scheme) {
  if (_authHeader == null) {
    _authHeader = AuthHeaders.fromHeaderStr(
        req.headers.value(HttpHeaders.authorizationHeader));
  }
  return _authHeader!.items[scheme]?.credentials;
}