copyWith method
AutoPilotConfig
copyWith({
- String? baseUrl,
- String? tokenType,
- int? timeoutSeconds,
- bool? enableLogs,
- bool? enableCache,
- Duration? cacheDuration,
- Map<
String, String> ? globalHeaders, - int? maxRetries,
- Duration? retryDelay,
- bool? enableTokenRefresh,
- Future<
String?> onRefreshToken()?, - bool? enableGlobalLoader,
- void onLoadingChanged()?,
- void onError()?,
- void onRequestSent()?,
- void onResponseReceived()?,
- String? successKey,
- dynamic successValue,
- String? messageKey,
- String? dataKey,
- bool? enableDeduplication,
- bool? printPayload,
- bool? prettyPrint,
- bool? enableOfflineQueue,
Implementation
AutoPilotConfig copyWith({
String? baseUrl,
String? tokenType,
int? timeoutSeconds,
bool? enableLogs,
bool? enableCache,
Duration? cacheDuration,
Map<String, String>? globalHeaders,
int? maxRetries,
Duration? retryDelay,
bool? enableTokenRefresh,
Future<String?> Function()? onRefreshToken,
bool? enableGlobalLoader,
void Function(bool)? onLoadingChanged,
void Function(String, int)? onError,
void Function(String, String)? onRequestSent,
void Function(String, int, Duration)? onResponseReceived,
String? successKey,
dynamic successValue,
String? messageKey,
String? dataKey,
bool? enableDeduplication,
bool? printPayload,
bool? prettyPrint,
bool? enableOfflineQueue,
}) =>
AutoPilotConfig(
baseUrl: baseUrl ?? this.baseUrl,
tokenType: tokenType ?? this.tokenType,
timeoutSeconds: timeoutSeconds ?? this.timeoutSeconds,
enableLogs: enableLogs ?? this.enableLogs,
enableCache: enableCache ?? this.enableCache,
cacheDuration: cacheDuration ?? this.cacheDuration,
globalHeaders: globalHeaders ?? this.globalHeaders,
maxRetries: maxRetries ?? this.maxRetries,
retryDelay: retryDelay ?? this.retryDelay,
enableTokenRefresh: enableTokenRefresh ?? this.enableTokenRefresh,
onRefreshToken: onRefreshToken ?? this.onRefreshToken,
enableGlobalLoader: enableGlobalLoader ?? this.enableGlobalLoader,
onLoadingChanged: onLoadingChanged ?? this.onLoadingChanged,
onError: onError ?? this.onError,
onRequestSent: onRequestSent ?? this.onRequestSent,
onResponseReceived: onResponseReceived ?? this.onResponseReceived,
successKey: successKey ?? this.successKey,
successValue: successValue ?? this.successValue,
messageKey: messageKey ?? this.messageKey,
dataKey: dataKey ?? this.dataKey,
enableDeduplication: enableDeduplication ?? this.enableDeduplication,
printPayload: printPayload ?? this.printPayload,
prettyPrint: prettyPrint ?? this.prettyPrint,
enableOfflineQueue: enableOfflineQueue ?? this.enableOfflineQueue,
);