ExtendedImage.network constructor

ExtendedImage.network(
  1. String url, {
  2. Key? key,
  3. String? semanticLabel,
  4. bool excludeFromSemantics = false,
  5. double? width,
  6. double? height,
  7. Color? color,
  8. Animation<double>? opacity,
  9. BlendMode? colorBlendMode,
  10. BoxFit? fit,
  11. AlignmentGeometry alignment = Alignment.center,
  12. ImageRepeat repeat = ImageRepeat.noRepeat,
  13. Rect? centerSlice,
  14. bool matchTextDirection = false,
  15. bool gaplessPlayback = false,
  16. FilterQuality filterQuality = FilterQuality.low,
  17. LoadStateChanged? loadStateChanged,
  18. BoxShape? shape,
  19. BoxBorder? border,
  20. BorderRadius? borderRadius,
  21. Clip clipBehavior = Clip.antiAlias,
  22. bool enableLoadState = true,
  23. BeforePaintImage? beforePaintImage,
  24. AfterPaintImage? afterPaintImage,
  25. ExtendedImageMode mode = ExtendedImageMode.none,
  26. bool enableMemoryCache = true,
  27. bool clearMemoryCacheIfFailed = true,
  28. DoubleTap? onDoubleTap,
  29. InitGestureConfigHandler? initGestureConfigHandler,
  30. bool enableSlideOutPage = false,
  31. BoxConstraints? constraints,
  32. CancellationToken? cancelToken,
  33. int retries = 3,
  34. Duration? timeLimit,
  35. Map<String, String>? headers,
  36. bool cache = true,
  37. double scale = 1.0,
  38. Duration timeRetry = const Duration(milliseconds: 100),
  39. Key? extendedImageEditorKey,
  40. InitEditorConfigHandler? initEditorConfigHandler,
  41. HeroBuilderForSlidingPage? heroBuilderForSlidingPage,
  42. bool clearMemoryCacheWhenDispose = false,
  43. bool handleLoadingProgress = false,
  44. Key? extendedImageGestureKey,
  45. int? cacheWidth,
  46. int? cacheHeight,
  47. bool isAntiAlias = false,
  48. String? cacheKey,
  49. bool printError = true,
  50. double? compressionRatio,
  51. int? maxBytes,
  52. bool cacheRawData = false,
  53. String? imageCacheName,
  54. Duration? cacheMaxAge,
  55. EdgeInsets layoutInsets = EdgeInsets.zero,
})

Implementation

ExtendedImage.network(
  String url, {
  Key? key,
  this.semanticLabel,
  this.excludeFromSemantics = false,
  this.width,
  this.height,
  this.color,
  this.opacity,
  this.colorBlendMode,
  this.fit,
  this.alignment = Alignment.center,
  this.repeat = ImageRepeat.noRepeat,
  this.centerSlice,
  this.matchTextDirection = false,
  this.gaplessPlayback = false,
  this.filterQuality = FilterQuality.low,
  this.loadStateChanged,
  this.shape,
  this.border,
  this.borderRadius,
  this.clipBehavior = Clip.antiAlias,
  this.enableLoadState = true,
  this.beforePaintImage,
  this.afterPaintImage,
  this.mode = ExtendedImageMode.none,
  this.enableMemoryCache = true,
  this.clearMemoryCacheIfFailed = true,
  this.onDoubleTap,
  this.initGestureConfigHandler,
  this.enableSlideOutPage = false,
  BoxConstraints? constraints,
  CancellationToken? cancelToken,
  int retries = 3,
  Duration? timeLimit,
  Map<String, String>? headers,
  bool cache = true,
  double scale = 1.0,
  Duration timeRetry = const Duration(milliseconds: 100),
  this.extendedImageEditorKey,
  this.initEditorConfigHandler,
  this.heroBuilderForSlidingPage,
  this.clearMemoryCacheWhenDispose = false,
  this.handleLoadingProgress = false,
  this.extendedImageGestureKey,
  int? cacheWidth,
  int? cacheHeight,
  this.isAntiAlias = false,
  String? cacheKey,
  bool printError = true,
  double? compressionRatio,
  int? maxBytes,
  bool cacheRawData = false,
  String? imageCacheName,
  Duration? cacheMaxAge,
  this.layoutInsets = EdgeInsets.zero,
})  : assert(cacheWidth == null || cacheWidth > 0),
      assert(cacheHeight == null || cacheHeight > 0),
      image = ExtendedResizeImage.resizeIfNeeded(
        provider: ExtendedNetworkImageProvider(
          url,
          scale: scale,
          headers: headers,
          cache: cache,
          cancelToken: cancelToken,
          retries: retries,
          timeRetry: timeRetry,
          timeLimit: timeLimit,
          cacheKey: cacheKey,
          printError: printError,
          cacheRawData: cacheRawData,
          imageCacheName: imageCacheName,
          cacheMaxAge: cacheMaxAge,
        ),
        compressionRatio: compressionRatio,
        maxBytes: maxBytes,
        cacheWidth: cacheWidth,
        cacheHeight: cacheHeight,
        cacheRawData: cacheRawData,
        imageCacheName: imageCacheName,
      ),
      assert(constraints == null || constraints.debugAssertIsValid()),
      constraints = (width != null || height != null)
          ? constraints?.tighten(width: width, height: height) ??
              BoxConstraints.tightFor(width: width, height: height)
          : constraints,
      assert(cacheWidth == null || cacheWidth > 0),
      assert(cacheHeight == null || cacheHeight > 0),
      super(key: key);