fromMap static method

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

Construct from Map.

Implementation

static ReorderChatFolders? 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_folder_ids = List<int>.from(
    (_map["chat_folder_ids"] ?? []).map(
      (e) => e as int,
    ),
  );
  var main_chat_list_position = _map['main_chat_list_position']! as int;
  return ReorderChatFolders(
    extra: extra,
    clientId: clientId,
    chat_folder_ids: chat_folder_ids,
    main_chat_list_position: main_chat_list_position,
  );
}