URecentContractItem.fromMap constructor
URecentContractItem.fromMap(
- Map<String, dynamic> json
)
Implementation
factory URecentContractItem.fromMap(Map<String, dynamic> json) => URecentContractItem(
id: json["id"] as String,
userName: json["userName"],
bedTitle: json["bedTitle"] ?? "",
dormTitle: json["dormTitle"] ?? "",
startDate: DateTime.parse(json["startDate"]),
endDate: DateTime.parse(json["endDate"]),
rent: (json["rent"] ?? 0).toString().toDouble(),
createdAt: DateTime.parse(json["createdAt"]),
);