OudsSmallListItemTrailingImage class

Trailing image slot for OudsSmallListItem.

Always rendered at OudsListItemAssetSize.small.

The image comes either from a local asset or from an asynchronous source (NetworkImage, MemoryImage or any custom ImageProvider) via the provider named constructor — the Flutter counterpart of passing an async Painter on Android.

Example:

OudsSmallListItemTrailingImage(asset: 'assets/photo.jpg')
// Asynchronous image from the network, with a placeholder shown while
// loading (and if loading fails)
OudsSmallListItemTrailingImage.provider(
  provider: NetworkImage('https://example.com/photo.jpg'),
  placeholder: Image.asset('assets/placeholder.jpg'),
)
// Or from any other ImageProvider (memory, file, app-provided caching
// library), with a custom placeholder
OudsSmallListItemTrailingImage.provider(
  provider: MemoryImage(bytes),
  placeholder: const ColoredBox(color: Color(0xFFEFEFEF)),
)
Inheritance

Constructors

OudsSmallListItemTrailingImage({required String asset, String? semanticsLabel, OudsListItemImageFormat format = OudsListItemImageFormat.square, bool rounded = false})
Creates a compact trailing image configuration from a local asset.
const
OudsSmallListItemTrailingImage.provider({required ImageProvider<Object>? provider, String? semanticsLabel, OudsListItemImageFormat format = OudsListItemImageFormat.square, bool rounded = false, Widget? placeholder})
Creates a compact trailing image configuration from any ImageProvider (NetworkImage, MemoryImage or a provider supplied by the app).
const

Properties

asset → String?
Path to the image asset (raster or SVG).
final
format → OudsListItemImageFormat
Aspect-ratio format. Defaults to OudsListItemImageFormat.square.
final
hashCode → int
The hash code for this object.
no setterinherited
placeholder → Widget?
Widget displayed in place of the image while provider is loading and if loading fails. Ignored for asset images.
final
provider → ImageProvider<Object>?
Image provider for an image loaded asynchronously or from a non-asset source (NetworkImage, MemoryImage or any custom provider).
final
rounded → bool
Whether the image is displayed with rounded corners. Defaults to false.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
semanticsLabel → String?
Accessibility description of the image for screen readers.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited