OptimizeStorage.fromMap constructor

OptimizeStorage.fromMap(
  1. Map<String, dynamic> map
)

Implementation

OptimizeStorage.fromMap(Map<String, dynamic> map) {
  extra = map['@extra'];
  client_id = map['@client_id'];
  size = map['size'];
  ttl = map['ttl'];
  count = map['count'];
  immunity_delay = map['immunity_delay'];
  if (map['file_types'] != null) {
    file_types = [];
    for (var someValue in map['file_types']) {
      if (someValue != null) {
        file_types?.add(TdApiMap.fromMap(someValue) as FileType);
      }
    }
  }
  if (map['chat_ids'] != null) {
    chat_ids = [];
    for (var someValue in map['chat_ids']) {
      chat_ids?.add(someValue);
    }
  }
  if (map['exclude_chat_ids'] != null) {
    exclude_chat_ids = [];
    for (var someValue in map['exclude_chat_ids']) {
      exclude_chat_ids?.add(someValue);
    }
  }
  return_deleted_file_statistics = map['return_deleted_file_statistics'];
  chat_limit = map['chat_limit'];
}