SmartConfig constructor
const
SmartConfig({
- required String baseUrl,
- Duration connectTimeout = const Duration(seconds: 30),
- Duration receiveTimeout = const Duration(seconds: 30),
- Duration sendTimeout = const Duration(seconds: 30),
- Map<
String, dynamic> defaultHeaders = const {}, - RetryPolicy retryPolicy = const RetryPolicy(),
- CachePolicy cachePolicy = const CachePolicy(),
- bool enableOfflineMode = true,
- bool enableDeduplication = true,
- TokenRefresher? tokenRefresher,
- BatchConfig? batchConfig,
- bool enableLogging = true,
- List<
Interceptor> extraInterceptors = const [], - String cacheBoxName = 'smart_network_cache',
- 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',
});