Complaint.fromJson constructor
Implementation
factory Complaint.fromJson(Map<String, dynamic> json) {
return Complaint(
json['id'] ?? 0,
json['category'],
json['title'],
json['details'],
json['status'],
json['userId'],
DateFormat('yyyy-MM-dd').format(DateTime.now()),
DateFormat('yyyy-MM-dd').format(DateTime.now()));
}