WarrantyDto.fromJson constructor
WarrantyDto.fromJson(- Map<String, dynamic> json
)
Implementation
factory WarrantyDto.fromJson(Map<String, dynamic> json) {
return WarrantyDto(
id: json["id"] as String,
billId: json["billId"] as String,
lineItemId: json["lineItemId"] as String?,
warrantyStart: json["warrantyStart"] == null
? null
: DateTime.parse(json["warrantyStart"] as String),
warrantyEnd: DateTime.parse(json["warrantyEnd"] as String),
warrantyName: json["warrantyName"] as String?,
reminders: (json["reminders"] as List<dynamic>?)
?.map((e) => ReminderDto.fromJson(e as Map<String, dynamic>))
.toList(),
notificationIsActivated: json["notificationIsActivated"] as bool,
);
}