RecentSearch.fromJson constructor

RecentSearch.fromJson(
  1. Map<String, dynamic> json
)

Creates a RecentSearch instance from a JSON map.

This factory constructor is used to create an instance of RecentSearch from a map structure representing JSON data. This is useful for deserializing JSON data retrieved from a database or an API.

Parameters: json - A map representing JSON data.

Returns: An instance of RecentSearch.

Implementation

factory RecentSearch.fromJson(Map<String, dynamic> json) => RecentSearch(
      jid: json["jid"],
      mid: json["mid"],
      searchType: json["search_type"],
      chatType: json["chat_type"],
      isSearch: json["is_search"],
    );