toJson method Null safety
Implementation
Map<String, dynamic> toJson() {
final json = _$BaseMessageFetchParamsToJson(this);
final replies = includeReplies;
final parentText = includeParentMessageText;
if (replies != null) {
json['include_reply_type'] = replies ? 'ALL' : 'NONE';
}
if (parentText != null) {
json['include_parent_message_info'] = parentText;
}
json.removeWhere((key, value) => value == null);
return json;
}