toMap method

Map<String, dynamic> toMap()

Implementation

Map<String, dynamic> toMap() {
  return {
    'id': id,
    'time': time,
    'message': message,
    'type': type == MessageType.values[0] ? 0 : 1,
    'content_type': contentType?.index,
    'sender': sender,
    'imageData': imageData
  };
}