setAuthHeader method

void setAuthHeader(
  1. String token, {
  2. String Bearer = "Bearer",
  3. String tokenType = "",
  4. String tokenKey = "Authorization",
})

Sets the authentication header with the provided token and optional parameters.

Implementation

void setAuthHeader(
  String token, {
  String Bearer = "Bearer",
  String tokenType = "",
  String tokenKey = "Authorization",
}) {
  _usertoken = Bearer + token;
  _tokenKey = tokenKey;
  _tokenType = tokenType;
  // _contentType = contentType ;
  // _contentTypeKey = contentTypeKey ;
}