ChatMessage class Null safety

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?
read / write
audioUrl String?
read / write
createdAt DateTime?
read / write
hashCode int
The hash code for this object. [...]
read-only, override
imagePath String?
read / write
imageUrl String?
read / write
isSender bool
final
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
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
read / write

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 non-existent 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