Application/medcify/lib/models/api/notification_count_response.dart

18 lines
394 B
Dart
Raw Normal View History

2022-09-26 06:33:52 +00:00
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;
}
}