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

24 lines
499 B
Dart
Raw Normal View History

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