setAccessToken static method

dynamic setAccessToken(
  1. String token, {
  2. String tokenKey = "Authorization",
  3. String tokenPrefix = "Bearer ",
})

Implementation

static setAccessToken(String token, {String tokenKey = "Authorization", String tokenPrefix = "Bearer "}) {
  log("Token is set: $token");
  _singleton.headers.update('Content-Type', (v) => "application/json; charset=UTF-8");
  //     ifAbsent: () => _singleton.headers.putIfAbsent("$tokenKey", () => "$tokenPrefix$token"));
  _singleton.token = token;
}