fromMap static method

UpdateChatFolders? fromMap(
  1. Map<String, dynamic>? _map
)
override

Construct from Map.

Implementation

static UpdateChatFolders? fromMap(Map<String, dynamic>? _map) {
  if (_map == null) return null;
  var _ = _map["@type"];
  if (_ != CONSTRUCTOR) return null;
  var extra = _map['@extra'];
  var clientId = _map['@clientId'];
  var chat_folders = List<ChatFolderInfo>.from(
    (_map["chat_folders"] ?? []).map(
      (e) => ChatFolderInfo.fromMap(e),
    ),
  );
  var main_chat_list_position = _map['main_chat_list_position']! as int;
  return UpdateChatFolders(
    extra: extra,
    clientId: clientId,
    chat_folders: chat_folders,
    main_chat_list_position: main_chat_list_position,
  );
}