PreviewAndCurrentImage constructor
PreviewAndCurrentImage({
- Key? key,
- ImageDealType? imageDealType,
- double? prepageImageWidth,
- double? prepageImageHeight,
- double? width,
- double? height,
- required String imageUrl,
- void lastImageUrlGetBlock(
- String lastImageUrl
- BoxFit? fit,
- PlaceholderWidgetBuilder? placeholder,
- LoadingErrorWidgetBuilder? errorWidget,
- Duration? placeholderFadeInDuration,
- Duration? fadeOutDuration,
- Duration fadeInDuration = Duration.zero,
- ProgressIndicatorBuilder? progressIndicatorBuilder,
Implementation
PreviewAndCurrentImage({
Key? key,
ImageDealType? imageDealType,
double? prepageImageWidth, // 前一个页面图片的点宽高(用于先提前用前一页图片展示)
double? prepageImageHeight, // 前一个页面图片的点宽高(用于先提前用前一页图片展示)
double? width,
double? height,
required String imageUrl,
void Function(String lastImageUrl)? lastImageUrlGetBlock, // 获取最后显示的url(打印用)
BoxFit? fit,
PlaceholderWidgetBuilder? placeholder,
LoadingErrorWidgetBuilder? errorWidget,
Duration? placeholderFadeInDuration,
Duration? fadeOutDuration,
Duration fadeInDuration = Duration.zero,
ProgressIndicatorBuilder? progressIndicatorBuilder,
}) : super(
key: key,
width: width,
height: height,
imageUrl: imageUrl,
fit: fit,
placeholder: (BuildContext context, String url) {
return TolerantNetworkImage(
imageDealType: imageDealType,
width: prepageImageWidth,
height: prepageImageHeight,
imageUrl: imageUrl,
fit: fit,
placeholder: placeholder,
errorWidget: errorWidget,
placeholderFadeInDuration: placeholderFadeInDuration,
fadeOutDuration: fadeOutDuration,
fadeInDuration: fadeInDuration,
progressIndicatorBuilder: progressIndicatorBuilder,
);
},
errorWidget: errorWidget,
placeholderFadeInDuration: placeholderFadeInDuration,
fadeOutDuration: fadeOutDuration,
fadeInDuration: fadeInDuration,
progressIndicatorBuilder: progressIndicatorBuilder,
);