ChatMessage class

Constructors

ChatMessage({String? text, String? imageUrl, String? imagePath, String? audioUrl, String? audioPath, required bool isSender, DateTime? createdAt})
ChatMessage.fromJson(String source)
factory
ChatMessage.fromMap(Map<String, dynamic> map)
create ChatMessage from json and retreve it from api
factory

Properties

audioPath String?
getter/setter pair
audioUrl String?
getter/setter pair
createdAt DateTime?
getter/setter pair
hashCode int
The hash code for this object.
no setteroverride
imagePath String?
getter/setter pair
imageUrl String?
getter/setter pair
isSender bool
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
text String?
plese note that only one of the following text,imageUrl,imagePath,audioUrl,audioPath must not be null at a time if more is provided an error will occure
getter/setter pair

Methods

copyWith({String? text, String? imageUrl, String? imagePath, String? audioUrl, String? audioPath, bool? isSender, DateTime? createdAt}) ChatMessage
getType() ChatMessageType
check message type to render the right widget
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() String
toMap() Map<String, dynamic>
convert the ChatMessage object to json
toString() String
override the toString function
override

Operators

operator ==(Object other) bool
override the '==' operator
override