ReportStoryResult.fromJson constructor

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

Parses whichever ReportStoryResult subtype the JSON describes.

Implementation

factory ReportStoryResult.fromJson(Map<String, dynamic> json) {
  final object = tdObjectFactories[json['@type']]?.call(json);
  return object is ReportStoryResult
      ? object
      : UndecodedReportStoryResult(json);
}