OudsListItemTrailingImage.provider constructor

const OudsListItemTrailingImage.provider({
  1. required ImageProvider<Object>? provider,
  2. String? semanticsLabel,
  3. OudsListItemImageSize size = OudsListItemImageSize.medium,
  4. OudsListItemImageFormat format = OudsListItemImageFormat.square,
  5. bool rounded = false,
  6. Widget? placeholder,
})

Creates a trailing 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.

OudsListItemTrailingImage.provider(
  provider: NetworkImage('https://example.com/photo.jpg'),
  semanticsLabel: 'Product photo',
  placeholder: Image.asset('assets/placeholder.jpg'),
)

Implementation

const OudsListItemTrailingImage.provider({
  required this.provider,
  this.semanticsLabel,
  this.size = OudsListItemImageSize.medium,
  this.format = OudsListItemImageFormat.square,
  this.rounded = false,
  this.placeholder,
}) : asset = null;