fromJson static method

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

Implementation

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

  return PushMessageContentMediaAlbum(
    totalCount: (json['total_count'] as int?) ?? 0,
    hasPhotos: (json['has_photos'] as bool?) ?? false,
    hasVideos: (json['has_videos'] as bool?) ?? false,
    hasAudios: (json['has_audios'] as bool?) ?? false,
    hasDocuments: (json['has_documents'] as bool?) ?? false,
  );
}