PreviewAndCurrentImage constructor

PreviewAndCurrentImage({
  1. Key? key,
  2. ImageDealType? imageDealType,
  3. double? prepageImageWidth,
  4. double? prepageImageHeight,
  5. double? width,
  6. double? height,
  7. required String imageUrl,
  8. void lastImageUrlGetBlock(
    1. String lastImageUrl
    )?,
  9. BoxFit? fit,
  10. PlaceholderWidgetBuilder? placeholder,
  11. LoadingErrorWidgetBuilder? errorWidget,
  12. Duration? placeholderFadeInDuration,
  13. Duration? fadeOutDuration,
  14. Duration fadeInDuration = Duration.zero,
  15. 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,
      );