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.
56 lines
1.7 KiB
56 lines
1.7 KiB
import 'package:flutter/material.dart';
|
|
import 'package:healthcare_pharmacy/settings.dart';
|
|
|
|
class BiddingRequestsModel {
|
|
String? custumerid_bidding = '';
|
|
String? pharmacyid_bidding='';
|
|
String? amount_bidding='';
|
|
String? bidding_bookingid='';
|
|
String? bidding_firstName='';
|
|
String? bidding_contactNumber='';
|
|
String? bidding_address='';
|
|
String orderStatus='';
|
|
String status='';
|
|
|
|
|
|
Color cardColor=Colors.white;
|
|
Color textColor=Colors.black;
|
|
|
|
|
|
|
|
BiddingRequestsModel();
|
|
|
|
factory BiddingRequestsModel.fromJson(Map<String, dynamic> json){
|
|
BiddingRequestsModel rtvm = new BiddingRequestsModel();
|
|
|
|
rtvm.custumerid_bidding = json['customerId'].toString() ??'';
|
|
rtvm.pharmacyid_bidding = json['pharmacyId'].toString() ?? '';
|
|
rtvm.amount_bidding = json['biddingAmount'].toString() ?? '';
|
|
rtvm.bidding_bookingid = json['bookingId'].toString() ?? '';
|
|
rtvm.bidding_firstName = json['customerDetails']["firstName"].toString() ?? '';
|
|
rtvm.bidding_firstName = json['customerDetails']["address1"].toString() ?? '';
|
|
rtvm.bidding_firstName = json['customerDetails']["firstName"].toString() ?? '';
|
|
|
|
rtvm.status = json['status'] ;
|
|
|
|
|
|
// rtvm.bidding_contactNumber = json['customerDetails']['profile']["contactNumber"].toString() ?? '';
|
|
|
|
// rtvm.bidding_contactNumber = json['contactNumber'].toString() ?? '';
|
|
// rtvm.bidding_address1 = json['address1'].toString() ?? '';
|
|
|
|
|
|
// rtvm.prescription_url = json['pictureUrl'][0] ?? '';
|
|
if(rtvm.status.toString().toLowerCase()=='accepted'){
|
|
rtvm.textColor=Colors.green;
|
|
}
|
|
else if(rtvm.status.toString().toLowerCase()=='rejected'){
|
|
rtvm.textColor=Colors.red;
|
|
}
|
|
else{
|
|
rtvm.textColor=primaryColor;
|
|
}
|
|
return rtvm;
|
|
}
|
|
|
|
} |