Updated.fromJson constructor
Implementation
factory Updated.fromJson(Map<String, Object?> json) => Updated(
id: json["id"] as String,
name: json["name"] as String,
description:
json["description"] == null ? null : json["description"] as String,
about: json["about"] == null ? null : json["about"] as String,
type: Type.fromJson(json["type"]),
reference:
json["reference"] == null ? null : json["reference"] as String,
taxCode: json["tax_code"] == null ? null : json["tax_code"] as String,
category: json["category"] == null ? null : json["category"] as String,
customData: json["custom_data"] == null
? null
: core.CustomData.fromJson(json["custom_data"]),
dimensions: json["dimensions"] == null
? null
: Dimensions.fromJson(
(json["dimensions"] as Map).cast<String, Object?>(),
),
prices: json["prices"] == null
? null
: (json["prices"] as List)
.map(
(item) => PriceSummary.fromJson(
(item as Map).cast<String, Object?>(),
),
)
.toList(),
unitDim: json["unit_dim"] == null ? null : json["unit_dim"] as String,
createdAt: decodeDateTime(json["created_at"]),
updatedAt: json["updated_at"] == null
? null
: decodeDateTime(json["updated_at"]),
);