setToken method

void setToken(
  1. String? userId,
  2. String idToken,
  3. String refreshToken,
  4. int expiresIn,
)

Implementation

void setToken(
    String? userId, String idToken, String refreshToken, int expiresIn) {
  var expiry = DateTime.now().add(Duration(seconds: expiresIn));
  _token = Token(userId, idToken, refreshToken, expiry);
  write(_token);
}