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.
53 lines
1.3 KiB
53 lines
1.3 KiB
|
|
class SupplierTankersModel {
|
|
String tanker_name = '';
|
|
String capacity='';
|
|
String phone_number='';
|
|
String type_of_water='';
|
|
String waterType='';
|
|
var typeOfWaterForBooking=[];
|
|
String price='';
|
|
var priceForBooking=[];
|
|
int badgeCount=0;
|
|
bool isSelected=false;
|
|
bool isStrikethrough=false;
|
|
String status='Available';
|
|
String id='';
|
|
bool enabled=true;
|
|
|
|
|
|
SupplierTankersModel();
|
|
|
|
|
|
factory SupplierTankersModel.fromJson(Map<String, dynamic> json){
|
|
SupplierTankersModel rtvm = new SupplierTankersModel();
|
|
|
|
rtvm.tanker_name = json['tankerName'] ?? '';
|
|
rtvm.phone_number = json['phoneNumber'] ?? '';
|
|
rtvm.capacity = json['capacity'] ?? '';
|
|
rtvm.price = json['price'] ?? '';
|
|
rtvm.id = json['_id'] ?? '';
|
|
rtvm.type_of_water = json['typeofwater']??'';
|
|
/*rtvm.waterType.forEach((element) {
|
|
|
|
rtvm.showTypeofWater.add(element['typeofwater']);
|
|
|
|
rtvm.typeOfWaterForBooking.add(element['typeofwater']);
|
|
|
|
rtvm.type_of_water=rtvm.showTypeofWater.join(",");
|
|
});*/
|
|
|
|
/*rtvm.price_api = json['price']??[];
|
|
rtvm.price_api.forEach((element) {
|
|
|
|
rtvm.show_price.add(element['price']);
|
|
|
|
rtvm.priceForBooking.add(element['price']);
|
|
|
|
rtvm.price=rtvm.show_price.join(",");
|
|
});*/
|
|
|
|
return rtvm;
|
|
}
|
|
|
|
} |