copyWith method
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,
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,
);
}