copyWith method

TokenResponse copyWith({
  1. String? accessToken,
  2. String? refreshToken,
  3. int? expiresIn,
  4. String? tokenType,
  5. DateTime? issuedAt,
  6. List<String>? scope,
})

Creates a copy of this TokenResponse with updated fields

Implementation

TokenResponse copyWith({
  String? accessToken,
  String? refreshToken,
  int? expiresIn,
  String? tokenType,
  DateTime? issuedAt,
  List<String>? scope,
}) {
  return TokenResponse(
    accessToken: accessToken ?? this.accessToken,
    refreshToken: refreshToken ?? this.refreshToken,
    expiresIn: expiresIn ?? this.expiresIn,
    tokenType: tokenType ?? this.tokenType,
    issuedAt: issuedAt ?? this.issuedAt,
    scope: scope ?? this.scope,
  );
}