RichComponent.image constructor

const RichComponent.image({
  1. required String id,
  2. required String url,
  3. String? alt,
  4. String? caption,
  5. @JsonKey.new(name: 'aspect_ratio') String? aspectRatio,
  6. List<RichAction>? actions,
  7. @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;