fromJson static method

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

Implementation

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

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