sendMessageModelFromJson function

ChatMessage sendMessageModelFromJson(
  1. String str
)

Converts a JSON string into a single ChatMessage object.

This function decodes the provided JSON string into a map, and then uses the ChatMessage.fromJson factory constructor to create a ChatMessage object.

str: The JSON string to be decoded.

Returns a ChatMessage object.

Implementation

ChatMessage sendMessageModelFromJson(String str) =>
    ChatMessage.fromJson(json.decode(str));