FadeInImage constructor
- Key? key,
- required ImageProvider<
Object> placeholder, - ImageErrorWidgetBuilder? placeholderErrorBuilder,
- required ImageProvider<
Object> image, - ImageErrorWidgetBuilder? imageErrorBuilder,
- bool excludeFromSemantics = false,
- String? imageSemanticLabel,
- Duration fadeOutDuration = const Duration(milliseconds: 300),
- Curve fadeOutCurve = Curves.easeOut,
- Duration fadeInDuration = const Duration(milliseconds: 700),
- Curve fadeInCurve = Curves.easeIn,
- Color? color,
- BlendMode? colorBlendMode,
- Color? placeholderColor,
- BlendMode? placeholderColorBlendMode,
- double? width,
- double? height,
- BoxFit? fit,
- BoxFit? placeholderFit,
- FilterQuality filterQuality = FilterQuality.medium,
- FilterQuality? placeholderFilterQuality,
- AlignmentGeometry alignment = Alignment.center,
- ImageRepeat repeat = ImageRepeat.noRepeat,
- bool matchTextDirection = false,
Creates a widget that displays a placeholder
while an image
is loading,
then fades-out the placeholder and fades-in the image.
The placeholder
and image
may be composed in a ResizeImage to provide
a custom decode/cache size.
The placeholder
and image
may have their own BoxFit settings via fit
and placeholderFit
.
The placeholder
and image
may have their own FilterQuality settings via filterQuality
and placeholderFilterQuality
.
If excludeFromSemantics
is true, then imageSemanticLabel
will be ignored.
Implementation
const FadeInImage({
super.key,
required this.placeholder,
this.placeholderErrorBuilder,
required this.image,
this.imageErrorBuilder,
this.excludeFromSemantics = false,
this.imageSemanticLabel,
this.fadeOutDuration = const Duration(milliseconds: 300),
this.fadeOutCurve = Curves.easeOut,
this.fadeInDuration = const Duration(milliseconds: 700),
this.fadeInCurve = Curves.easeIn,
this.color,
this.colorBlendMode,
this.placeholderColor,
this.placeholderColorBlendMode,
this.width,
this.height,
this.fit,
this.placeholderFit,
this.filterQuality = FilterQuality.medium,
this.placeholderFilterQuality,
this.alignment = Alignment.center,
this.repeat = ImageRepeat.noRepeat,
this.matchTextDirection = false,
});