searchResult2DartMessageSearchResult static method

V2TimMessageSearchResult searchResult2DartMessageSearchResult(
  1. dynamic jsonResult
)

Implementation

static V2TimMessageSearchResult searchResult2DartMessageSearchResult(jsonResult) {
  List list = List.empty(growable: true);
  if (jsonResult["msg_search_result_item_array"] != null) {
    for (Map<String, dynamic> item in jsonResult["msg_search_result_item_array"]) {
      list.add(searchResult2DartMessageSearchResult(item).toJson());
    }
  }
  return V2TimMessageSearchResult.fromJson({
    "totalCount": jsonResult["msg_search_result_total_count"],
    "messageSearchResultItems": list,
  });
}