ChatList.fromJson constructor

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

a ChatList return type can be :

Implementation

factory ChatList.fromJson(Map<String, dynamic> json) {
  switch (json["@type"]) {
    case ChatListMain.CONSTRUCTOR:
      return ChatListMain.fromJson(json);
    case ChatListArchive.CONSTRUCTOR:
      return ChatListArchive.fromJson(json);
    case ChatListFolder.CONSTRUCTOR:
      return ChatListFolder.fromJson(json);
    default:
      return const ChatList();
  }
}