Application/medcify/lib/models/api/notification_count_response.dart
2022-09-26 12:03:52 +05:30

18 lines
394 B
Dart

class NotificationCountResponse{
bool? status;
String? message;
int? count;
NotificationCountResponse.fromJson(Map<String, dynamic> json){
status = (json["Code"] ?? "") != "0";
count = json["Data"] ?? 0;
message = json["Message"] ?? "Something went wrong";
}
NotificationCountResponse.withError(String err){
status = false;
message = err;
count = 0;
}
}