copyWith method

OAuthConfig copyWith({
  1. String? baseUrl,
  2. String? clientId,
  3. String? redirectScheme,
  4. List<String>? scopes,
  5. Duration? tokenRefreshThreshold,
  6. bool? autoRefresh,
  7. StorageType? storageType,
  8. String? customAuthorizationEndpoint,
  9. String? customTokenEndpoint,
  10. String? customUserInfoEndpoint,
  11. Map<String, String>? additionalAuthParams,
  12. Duration? networkTimeout,
  13. bool? enableLogging,
})

Creates a copy of this OAuthConfig with updated fields

Implementation

OAuthConfig copyWith({
  String? baseUrl,
  String? clientId,
  String? redirectScheme,
  List<String>? scopes,
  Duration? tokenRefreshThreshold,
  bool? autoRefresh,
  StorageType? storageType,
  String? customAuthorizationEndpoint,
  String? customTokenEndpoint,
  String? customUserInfoEndpoint,
  Map<String, String>? additionalAuthParams,
  Duration? networkTimeout,
  bool? enableLogging,
}) {
  return OAuthConfig(
    baseUrl: baseUrl ?? this.baseUrl,
    clientId: clientId ?? this.clientId,
    redirectScheme: redirectScheme ?? this.redirectScheme,
    scopes: scopes ?? this.scopes,
    tokenRefreshThreshold:
        tokenRefreshThreshold ?? this.tokenRefreshThreshold,
    autoRefresh: autoRefresh ?? this.autoRefresh,
    storageType: storageType ?? this.storageType,
    customAuthorizationEndpoint:
        customAuthorizationEndpoint ?? this.customAuthorizationEndpoint,
    customTokenEndpoint: customTokenEndpoint ?? this.customTokenEndpoint,
    customUserInfoEndpoint:
        customUserInfoEndpoint ?? this.customUserInfoEndpoint,
    additionalAuthParams: additionalAuthParams ?? this.additionalAuthParams,
    networkTimeout: networkTimeout ?? this.networkTimeout,
    enableLogging: enableLogging ?? this.enableLogging,
  );
}