TolerantNetworkImage constructor

TolerantNetworkImage({
  1. Key? key,
  2. ImageDealType? imageDealType,
  3. double? width,
  4. double? height,
  5. BorderRadiusGeometry? borderRadius,
  6. required String imageUrl,
  7. void lastImageUrlGetBlock(
    1. String lastImageUrl
    )?,
  8. BoxFit? fit,
  9. PlaceholderWidgetBuilder? placeholder,
  10. LoadingErrorWidgetBuilder? errorWidget,
  11. Duration? placeholderFadeInDuration,
  12. Duration? fadeOutDuration,
  13. Duration fadeInDuration = Duration.zero,
  14. bool gaplessPlayback = true,
  15. void loadStateChanged(
    1. ExtendedImageState? state,
    2. String imageUrl
    )?,
  16. ProgressIndicatorBuilder? progressIndicatorBuilder,
})

Implementation

TolerantNetworkImage({
  Key? key,
  ImageDealType? imageDealType,
  double? width,
  double? height,
  BorderRadiusGeometry? borderRadius,
  required String imageUrl,
  void Function(String lastImageUrl)? lastImageUrlGetBlock, // 获取最后显示的url(打印用)
  BoxFit? fit,
  PlaceholderWidgetBuilder? placeholder,
  LoadingErrorWidgetBuilder? errorWidget,
  Duration? placeholderFadeInDuration,
  Duration? fadeOutDuration,
  Duration fadeInDuration = Duration.zero,
  bool gaplessPlayback = true,
  void Function(ExtendedImageState? state, String imageUrl)? loadStateChanged,
  ProgressIndicatorBuilder? progressIndicatorBuilder,
}) : super(
        key: key,
        width: width,
        height: height,
        borderRadius: borderRadius,
        imageUrl: DataVientiane.newImageUrl(
          imageUrl,
          imageDealType ?? ImageDealType.default2,
          width: width,
          height: height,
          lastImageUrlGetBlock: lastImageUrlGetBlock,
        ),
        fit: fit,
        placeholder: placeholder,
        errorWidget: errorWidget,
        placeholderFadeInDuration: placeholderFadeInDuration,
        fadeOutDuration: fadeOutDuration,
        fadeInDuration: fadeInDuration,
        progressIndicatorBuilder: progressIndicatorBuilder,
        loadStateChanged: loadStateChanged,
        gaplessPlayback: gaplessPlayback,
      );