fromJson static method

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

Implementation

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

  return BotMediaPreview(
    date: (json['date'] as int?) ?? 0,
    content: StoryContent.fromJson(tdMapFromJson(json['content'])),
  );
}