Map<String, dynamic> onlyMessagesToJson() => { "list_messages": listMessages == null ? [] : List<dynamic>.from(listMessages!.map((x) => x.toJson())), };