RichComponent.image constructor
const
RichComponent.image({
- required String id,
- required String url,
- String? alt,
- String? caption,
- @JsonKey.new(name: 'aspect_ratio') String? aspectRatio,
- List<
RichAction> ? actions, - @JsonKey.new(name: 'on_tap_callback') OnTapCallback? onTapCallback,
Standalone image component
Implementation
const factory RichComponent.image({
required String id,
required String url,
String? alt,
String? caption,
@JsonKey(name: 'aspect_ratio') String? aspectRatio,
List<RichAction>? actions,
/// Fires a host callback when the image is tapped, instead of
/// the SDK's default zoomable preview. Mirrors the same field on
/// [RichImage] — see that field's doc for the rationale.
@JsonKey(name: 'on_tap_callback') OnTapCallback? onTapCallback,
}) = ImageComponent;