setAuth method

void setAuth(
  1. String token
)

Updates the authorization header

token - the new jwt token sent in the authorisation header

Implementation

void setAuth(String token) {
  _headers['Authorization'] = 'Bearer $token';
}