TolerantNetworkImage constructor
TolerantNetworkImage({
- Key? key,
- ImageDealType? imageDealType,
- double? width,
- double? height,
- BorderRadiusGeometry? borderRadius,
- required String imageUrl,
- void lastImageUrlGetBlock(
- String lastImageUrl
- BoxFit? fit,
- PlaceholderWidgetBuilder? placeholder,
- LoadingErrorWidgetBuilder? errorWidget,
- Duration? placeholderFadeInDuration,
- Duration? fadeOutDuration,
- Duration fadeInDuration = Duration.zero,
- bool gaplessPlayback = true,
- void loadStateChanged(
- ExtendedImageState? state,
- String imageUrl
- 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,
);