fromJson static method

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

Implementation

static ChatBoost? fromJson(Map<String, dynamic>? json) {
  if (json == null) {
    return null;
  }

  return ChatBoost(
    id: (json['id'] as String?) ?? '',
    count: (json['count'] as int?) ?? 0,
    source: ChatBoostSource.fromJson(tdMapFromJson(json['source'])),
    startDate: (json['start_date'] as int?) ?? 0,
    expirationDate: (json['expiration_date'] as int?) ?? 0,
  );
}