AutoPilotConfig class

Constructors

AutoPilotConfig({required String baseUrl, String tokenType = 'Bearer', int timeoutSeconds = 30, bool enableLogs = kDebugMode, bool enableCache = false, Duration cacheDuration = const Duration(minutes: 5), Map<String, String> globalHeaders = const {}, int maxRetries = 3, Duration retryDelay = const Duration(seconds: 1), bool enableTokenRefresh = false, Future<String?> onRefreshToken()?, bool enableGlobalLoader = false, void onLoadingChanged(bool loading)?, void onError(String message, int statusCode)?, void onRequestSent(String url, String method)?, void onResponseReceived(String url, int statusCode, Duration time)?, String successKey = 'status', dynamic successValue = true, String messageKey = 'message', String dataKey = 'data', bool enableDeduplication = true, bool printPayload = true, bool prettyPrint = true})
const

Properties

baseUrl String
final
cacheDuration Duration
final
dataKey String
final
enableCache bool
final
enableDeduplication bool
final
enableGlobalLoader bool
final
enableLogs bool
final
enableTokenRefresh bool
final
globalHeaders Map<String, String>
final
hashCode int
The hash code for this object.
no setterinherited
maxRetries int
final
messageKey String
final
onError → void Function(String message, int statusCode)?
final
onLoadingChanged → void Function(bool loading)?
final
onRefreshToken Future<String?> Function()?
final
onRequestSent → void Function(String url, String method)?
final
onResponseReceived → void Function(String url, int statusCode, Duration time)?
final
prettyPrint bool
final
printPayload bool
final
retryDelay Duration
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
successKey String
final
successValue → dynamic
final
timeoutSeconds int
final
tokenType String
final

Methods

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(bool)?, void onError(String, int)?, void onRequestSent(String, String)?, void onResponseReceived(String, int, Duration)?, String? successKey, dynamic successValue, String? messageKey, String? dataKey, bool? enableDeduplication, bool? printPayload, bool? prettyPrint}) AutoPilotConfig
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited