OudsSmallListItemLeadingImage.provider constructor
- required ImageProvider<
Object> ? provider, - String? semanticsLabel,
- OudsListItemImageFormat format = OudsListItemImageFormat.square,
- bool rounded = false,
- Widget? placeholder,
Creates a compact leading image configuration from any ImageProvider (NetworkImage, MemoryImage or a provider supplied by the app).
placeholder is shown while the image is loading and if loading fails;
when null, the image background color shows through instead.
OudsSmallListItemLeadingImage.provider(
provider: NetworkImage('https://example.com/photo.jpg'),
semanticsLabel: 'Product photo',
placeholder: Image.asset('assets/placeholder.jpg'),
)
Implementation
const OudsSmallListItemLeadingImage.provider({
required this.provider,
this.semanticsLabel,
this.format = OudsListItemImageFormat.square,
this.rounded = false,
this.placeholder,
}) : asset = null;