ProdobitConfig class

Configuration for Prodobit client

Constructors

ProdobitConfig({required String baseUrl, String apiVersion = 'v1', Duration timeout = const Duration(seconds: 30), Duration connectTimeout = const Duration(seconds: 15), Duration receiveTimeout = const Duration(seconds: 30), bool enableLogging = false, int maxRetries = 3, Duration retryInterval = const Duration(seconds: 1), bool cacheEnabled = true, Duration cacheDuration = const Duration(minutes: 5), Map<String, String> headers = const {}})
const

Properties

apiBaseUrl String
Complete API base URL with version
no setter
apiVersion String
API version to use
final
baseUrl String
Base URL for the Prodobit API
final
cacheDuration Duration
Cache duration for responses
final
cacheEnabled bool
Enable response caching
final
connectTimeout Duration
Connection timeout duration
final
enableLogging bool
Enable request/response logging
final
hashCode int
The hash code for this object.
no setterinherited
headers Map<String, String>
Default headers to include in all requests
final
maxRetries int
Maximum number of retry attempts
final
props List<Object?>
The list of properties that will be used to determine whether two instances are equal.
no setter
receiveTimeout Duration
Response receive timeout duration
final
retryInterval Duration
Interval between retry attempts
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
stringify bool?
If set to true, the toString method will be overridden to output this instance's props.
no setterinherited
timeout Duration
Request timeout duration
final

Methods

copyWith({String? baseUrl, String? apiVersion, Duration? timeout, Duration? connectTimeout, Duration? receiveTimeout, bool? enableLogging, int? maxRetries, Duration? retryInterval, bool? cacheEnabled, Duration? cacheDuration, Map<String, String>? headers}) ProdobitConfig
Create a copy with modified values
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