ScHttpClient constructor Null safety

ScHttpClient(
  1. {String? getCache(
    1. Uri
    ) = _getCacheDmy,
  2. void setCache(
    1. Uri,
    2. String,
    3. Duration?
    ) = _setCacheDmy,
  3. String? getPostCache(
    1. Uri,
    2. Object
    ) = _getPostCacheDmy,
  4. void setPostCache(
    1. Uri,
    2. Object,
    3. String,
    4. Duration?
    ) = _setPostCacheDmy,
  5. Uint8List? getBinCache(
    1. Uri
    ) = _getBinCacheDmy,
  6. void setBinCache(
    1. Uri,
    2. Uint8List,
    3. Duration?
    ) = _setCacheDmy,
  7. bool forceCache = false,
  8. bool forceBinCache = false,
  9. String? userAgent,
  10. String findProxy(
    1. Uri
    )?}
)

Implementation

ScHttpClient({
  this.getCache = _getCacheDmy,
  this.setCache = _setCacheDmy,
  this.getPostCache = _getPostCacheDmy,
  this.setPostCache = _setPostCacheDmy,
  this.getBinCache = _getBinCacheDmy,
  this.setBinCache = _setCacheDmy,
  this.forceCache = false,
  this.forceBinCache = false,
  String? userAgent,
  String Function(Uri)? findProxy,
}) {
  if (userAgent != null) _client.userAgent = userAgent;
  if (findProxy != null) _client.findProxy = findProxy;
}