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

29 lines
611 B
Dart

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