ImageView constructor
const
ImageView({})
Creates an ImageView widget.
The url
parameter is required and should be a Future that resolves to the image URL.
Either thumbHash
or blurHash
can be provided to generate a placeholder.
Example:
ImageView(
url: Future.value("https://example.com/image.jpg"),
blurHash: "L6PZfSi_.AyE_3t7t7R**0o#DgR4",
style: ImageStyle(
fit: BoxFit.cover,
width: 300,
height: 200,
),
)
Implementation
const ImageView(
{super.key,
required this.url,
this.fadeOutDuration = const Duration(milliseconds: 250),
this.style = const ImageStyle(),
this.thumbHash,
this.blurHash,
this.cacheKey});