SmartConfig constructor

const SmartConfig({
  1. required String baseUrl,
  2. Duration connectTimeout = const Duration(seconds: 30),
  3. Duration receiveTimeout = const Duration(seconds: 30),
  4. Duration sendTimeout = const Duration(seconds: 30),
  5. Map<String, dynamic> defaultHeaders = const {},
  6. RetryPolicy retryPolicy = const RetryPolicy(),
  7. CachePolicy cachePolicy = const CachePolicy(),
  8. bool enableOfflineMode = true,
  9. bool enableDeduplication = true,
  10. TokenRefresher? tokenRefresher,
  11. BatchConfig? batchConfig,
  12. bool enableLogging = true,
  13. List<Interceptor> extraInterceptors = const [],
  14. String cacheBoxName = 'smart_network_cache',
  15. String offlineQueueBoxName = 'smart_network_offline_queue',
})

Implementation

const SmartConfig({
  required this.baseUrl,
  this.connectTimeout = const Duration(seconds: 30),
  this.receiveTimeout = const Duration(seconds: 30),
  this.sendTimeout = const Duration(seconds: 30),
  this.defaultHeaders = const {},
  this.retryPolicy = const RetryPolicy(),
  this.cachePolicy = const CachePolicy(),
  this.enableOfflineMode = true,
  this.enableDeduplication = true,
  this.tokenRefresher,
  this.batchConfig,
  this.enableLogging = true,
  this.extraInterceptors = const [],
  this.cacheBoxName = 'smart_network_cache',
  this.offlineQueueBoxName = 'smart_network_offline_queue',
});