You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
pharmacy/lib/models/pharmacy_accounts_model.dart

60 lines
1.7 KiB

import 'package:flutter/material.dart';
import 'package:healthcare_pharmacy/settings.dart';
class PharmacyAccountsModel {
String pharmacyId = '';
String customerId = '';
String bookingId = '';
String biddingAmount = '';
String date = '';
String orderStatus = '';
String acceptedCount = '';
String pendingRejectedCount = '';
String deliveredCount = '';
String deliveredTotalPrice = '';
String deliveredTotalAmountPaid = '';
String deliveredTotalAmountDue = '';
Color payment_color=Colors.grey;
String displayText = '';
PharmacyAccountsModel();
factory PharmacyAccountsModel.fromJson(Map<String, dynamic> json){
PharmacyAccountsModel rtvm = new PharmacyAccountsModel();
rtvm.pharmacyId = json['pharmacyId'] ?? '';
rtvm.customerId = json['customerId'] ?? '';
rtvm.bookingId = json['bookingId'] ?? '';
rtvm.biddingAmount = json['biddingAmount'] ?? '';
rtvm.date = json['date'] ?? '';
rtvm.orderStatus = json['status'] ?? '';
rtvm.acceptedCount = json['acceptedCount'] ?? '';
rtvm.pendingRejectedCount = json['pendingRejectedCount'] ?? '';
rtvm.deliveredCount = json['deliveredCount'] ?? '';
rtvm.deliveredTotalPrice = json['deliveredTotalPrice'] ?? '';
rtvm.deliveredTotalAmountPaid = json['deliveredTotalAmountPaid'] ?? '';
rtvm.deliveredTotalAmountDue = json['deliveredTotalAmountDue'] ?? '';
/* if(rtvm.orderStatus=='delivered' && rtvm.payment_status=='paid'){
rtvm.payment_color=Colors.green;
rtvm.displayText='Payment Completed';
}
else if(rtvm.orderStatus=='delivered' && rtvm.payment_status=='due'){
rtvm.payment_color=primaryColor;
rtvm.displayText='Due';
}*/
return rtvm;
}
}