setAuthToken static method

dynamic setAuthToken(
  1. String token
)

setAuthToken method to set the token for authentication Every request will be sent with this token where needed

Example:

Service.setAuthToken("token");
print(Service.getToken); // token

Implementation

static setAuthToken(String token) => _authToken = token;