sendMessageModelFromJson function
Converts a JSON string into a ChatMessageModel object.
This function decodes the given JSON string and uses the fromJson
constructor
of the ChatMessageModel class to create an instance.
Parameters:
str
- A JSON string representation of a ChatMessageModel object.
Returns: An instance of ChatMessageModel populated with data from the given JSON string.
Implementation
ChatMessageModel sendMessageModelFromJson(String str) =>
ChatMessageModel.fromJson(json.decode(str));