asToken method Null safety

AuthToken asToken()

As an AuthToken.

Implementation

AuthToken asToken() {
  return AuthToken()
    ..accessToken = accessToken
    ..refreshToken = refreshToken
    ..issueDate = issueDate
    ..expirationDate = expirationDate
    ..type = type
    ..resourceOwnerIdentifier = resourceOwner!.id
    ..scopes = scope?.split(" ").map((s) => AuthScope(s)).toList()
    ..clientID = client.id;
}