fromJson static method

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

Implementation

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

  return PushMessageContentVideo(
    video: Video.fromJson(tdMapFromJson(json['video'])),
    caption: (json['caption'] as String?) ?? '',
    isSecret: (json['is_secret'] as bool?) ?? false,
    isPinned: (json['is_pinned'] as bool?) ?? false,
  );
}