toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() => {
      'senderId': senderId,
      'roomId': roomId,
      '_id': messageId,
      'createdAt': time,
      'text': text,
      'file': file?.toJson(),
      'time': fileTime,
      'reacts': reacts,
    };