LocalOrCachedNetworkImageProvider.fromFutures constructor

const LocalOrCachedNetworkImageProvider.fromFutures({
  1. Key? key,
  2. required Future<File?>? fileFuture,
  3. required Future<String?>? urlFuture,
  4. double? scale = 1.0,
  5. bool fileMustExist = true,
  6. Map<String, String>? headers,
  7. BaseCacheManager? cacheManager,
  8. String? cacheKey,
  9. int? maxWidth,
  10. int? maxHeight,
  11. bool asyncHeadFirst = false,
  12. Duration? networkTimeout,
  13. void onFileLoading()?,
  14. void onUrlLoading()?,
  15. void onFileLoaded(
    1. Object? err
    )?,
  16. void onUrlLoaded(
    1. Object? err
    )?,
})

Implementation

const LocalOrCachedNetworkImageProvider.fromFutures({
  // general
  this.key,
  required this.fileFuture,
  required this.urlFuture,
  this.scale = 1.0,
  // local
  this.fileMustExist = true,
  // network
  this.headers,
  this.cacheManager,
  this.cacheKey,
  this.maxWidth,
  this.maxHeight,
  this.asyncHeadFirst = false,
  this.networkTimeout,
  // callbacks
  this.onFileLoading,
  this.onUrlLoading,
  this.onFileLoaded,
  this.onUrlLoaded,
})  : // general
      _useFuture = true,
      file = null,
      url = null,
      assert(fileFuture != null || urlFuture != null);