fromJson static method

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

Implementation

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

  return StarSubscriptionTypeBot(
    isCanceledByBot: (json['is_canceled_by_bot'] as bool?) ?? false,
    title: (json['title'] as String?) ?? '',
    photo: Photo.fromJson(tdMapFromJson(json['photo'])),
    invoiceLink: (json['invoice_link'] as String?) ?? '',
  );
}