Complaint.fromJson constructor

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

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()));
}