fromJson static method

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

Implementation

static ProductDiet fromJson(Map<String, dynamic> json) => ProductDiet(
      product:
          json['product'] != null ? Product.fromJson(json['product']) : null,
      diet: json['diet'] != null ? Diet.fromJson(json['diet']) : null,
      id: json['id'],
      created:
          json['created'] != null ? DateTime.parse(json['created']) : null,
      creator: json['creator'],
      updated:
          json['updated'] != null ? DateTime.parse(json['updated']) : null,
      updater: json['updater'],
    );