Content.fromJson constructor

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

Implementation

factory Content.fromJson(Map<String, dynamic> json) {
  return Content(
    address: json['address'],
    innerPath: json['inner_path'],
    signsRequired: json['signs_required'],
    files: json['files'],
    filesOptional: json['files_optional'],
    includes: json['includes'],
    title: json['title'],
    description: json['description'],
    ignore: json['ignore'],
    modified: json['modified'],
    zeronetVersion: json['zeronet_version'],
    //
    backgroundColor: json['background-color'],
    backgroundColorDark: json['background-color-dark'],
    postmessageNonceSecurity: json['postmessage_nonce_security'],
    translate: json['translate']?.cast<String>(),
    viewport: json['viewport'],
  );
}