UnsentMessages.fromMap constructor

UnsentMessages.fromMap(
  1. Map<String, dynamic> map
)

Implementation

factory UnsentMessages.fromMap(Map<String, dynamic> map) {
  return UnsentMessages(
    messageType: MessageType.values[map['messageType'] as int],
    message: map['message'] != null ? map['message'] as String : null,
    messageTime:
        map['messageTime'] != null ? map['messageTime'] as String : null,
    filePath: map['filePath'] != null ? map['filePath'] as String : null,
    platform: map['platform'] != null ? map['platform'] as String : null,
    name: map['name'] != null ? map['name'] as String : null,
    conversationUid: map['conversationUid'] != null
        ? map['conversationUid'] as String
        : null,
  );
}