CometChatCardImageElement class final

An image element that renders a network image with optional sizing and fit.

The url can be a plain string or a CometChatCardColorValue for theme-aware image URLs (different images for light/dark mode).

Inheritance

Constructors

CometChatCardImageElement({required String id, required dynamic url, String? altText, String? fit, dynamic width, dynamic height, double? borderRadius, dynamic padding})
const
CometChatCardImageElement.fromJson(Map<String, dynamic> json)
factory

Properties

altText String?
Alternative text used for accessibility.
final
borderRadius double?
Corner radius applied to the image.
final
fit String?
How the image should be inscribed into its box (e.g. cover, contain).
final
hashCode int
The hash code for this object.
no setterinherited
height → dynamic
Explicit height, as a number or layout keyword.
final
id String
Unique identifier for this element within the card.
finalinherited
padding → dynamic
Padding around the image, as a number or per-edge map.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
type String
The element type discriminator (e.g. text, image, row).
finalinherited
url → dynamic
Image source URL; a plain string or theme-aware CometChatCardColorValue.
final
width → dynamic
Explicit width, as a number or layout keyword.
final

Methods

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

Operators

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