ChatMedia class

Represents a media attachment in a chat message.

Constructors

ChatMedia({required String url, ChatMediaType type = ChatMediaType.image, String? fileName, int? size, String? extension, Map<String, dynamic>? metadata, Widget customBuilder(BuildContext, ChatMedia)?})
const

Properties

customBuilder Widget Function(BuildContext, ChatMedia)?
Optional widget to use for rendering this media
final
extension String?
Optional file extension
final
fileName String?
Optional file name
final
hashCode int
The hash code for this object.
no setterinherited
metadata Map<String, dynamic>?
Optional metadata about the media
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
size int?
Optional file size in bytes
final
type ChatMediaType
The type of media (image, video, file, etc.)
final
url String
The URL of the media
final

Methods

copyWith({String? url, ChatMediaType? type, String? fileName, int? size, String? extension, Map<String, dynamic>? metadata, Widget customBuilder(BuildContext, ChatMedia)?}) ChatMedia
Creates a copy of this media with the given fields replaced with new values
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