V2TimMessageSearchResult.fromJson constructor

V2TimMessageSearchResult.fromJson(
  1. Map json
)

Implementation

V2TimMessageSearchResult.fromJson(Map json) {
  json = Utils.formatJson(json);
  totalCount = json['totalCount'];
  searchCursor = json["searchCursor"] ?? "";
  if (json['messageSearchResultItems'] != null) {
    messageSearchResultItems = List.empty(growable: true);
    json['messageSearchResultItems'].forEach((v) {
      messageSearchResultItems!.add(V2TimMessageSearchResultItem.fromJson(v));
    });
  }
}