fromMap static method

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

Construct from Map.

Implementation

static StorageStatistics? 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 size = _map['size']! as int;
  var count = _map['count']! as int;
  var by_chat = List<StorageStatisticsByChat>.from(
    (_map["by_chat"] ?? []).map(
      (e) => StorageStatisticsByChat.fromMap(e),
    ),
  );
  return StorageStatistics(
    extra: extra,
    clientId: clientId,
    size: size,
    count: count,
    by_chat: by_chat,
  );
}