ExtendedImage.network constructor
ExtendedImage.network(
- String url, {
- Key? key,
- String? semanticLabel,
- bool excludeFromSemantics = false,
- double? width,
- double? height,
- Color? color,
- Animation<
double> ? opacity, - BlendMode? colorBlendMode,
- BoxFit? fit,
- AlignmentGeometry alignment = Alignment.center,
- ImageRepeat repeat = ImageRepeat.noRepeat,
- Rect? centerSlice,
- bool matchTextDirection = false,
- bool gaplessPlayback = false,
- FilterQuality filterQuality = FilterQuality.low,
- LoadStateChanged? loadStateChanged,
- BoxShape? shape,
- BoxBorder? border,
- BorderRadius? borderRadius,
- Clip clipBehavior = Clip.antiAlias,
- bool enableLoadState = true,
- BeforePaintImage? beforePaintImage,
- AfterPaintImage? afterPaintImage,
- ExtendedImageMode mode = ExtendedImageMode.none,
- bool enableMemoryCache = true,
- bool clearMemoryCacheIfFailed = true,
- DoubleTap? onDoubleTap,
- InitGestureConfigHandler? initGestureConfigHandler,
- bool 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),
- Key? extendedImageEditorKey,
- InitEditorConfigHandler? initEditorConfigHandler,
- HeroBuilderForSlidingPage? heroBuilderForSlidingPage,
- bool clearMemoryCacheWhenDispose = false,
- bool handleLoadingProgress = false,
- Key? extendedImageGestureKey,
- int? cacheWidth,
- int? cacheHeight,
- bool isAntiAlias = false,
- String? cacheKey,
- bool printError = true,
- double? compressionRatio,
- int? maxBytes,
- bool cacheRawData = false,
- String? imageCacheName,
- Duration? cacheMaxAge,
- 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);