ChatMessage.fromJson constructor

ChatMessage.fromJson(
  1. Map<String, dynamic> json,
  2. String messageId
)

Implementation

ChatMessage.fromJson(Map<String, dynamic> json, String messageId)
    : id = messageId,
      url = json['url'],
      text = json['text'],
      type = json['type'],
      authorId = json['authorId'],
      createdOn = DateTime.parse(json['createdOn']);