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

17 lines
370 B
Dart
Raw Normal View History

2022-09-26 06:33:52 +00:00
class OverviewResponse{
bool? status;
String? message;
dynamic count;
OverviewResponse.fromJson(Map<String, dynamic> json){
status = (json["Code"] ?? "0") != "0";
message = json["Message"] ?? "Something went wrong";
count = json["Data"] ?? 0;
}
OverviewResponse.withError(String err){
status = false;
message = err;
count = 0;
}
}