copyWith method

OauthToken copyWith(
  1. String accessToken,
  2. int expiresIn
)

Refreshes this token with the new accessToken and expiresIn.

Implementation

OauthToken copyWith(String accessToken, int expiresIn) => OauthToken(
  accessToken: accessToken,
  expiresIn: expiresIn,
  refreshToken: refreshToken,
  scope: scope,
  tokenType: tokenType,
  provider: provider,
  created: DateTime.now().toUtc(),
);