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.
55 lines
1.1 KiB
55 lines
1.1 KiB
import 'package:flutter/material.dart';
|
|
|
|
|
|
class GetTanksDetailsModel {
|
|
String tanker_name = '';
|
|
String tanker_phone = '';
|
|
String tanker_alterphone = '';
|
|
String capacity='';
|
|
|
|
List type_of_water=[];
|
|
List showTypeofWater=[];
|
|
String water_type='';
|
|
|
|
|
|
List price=[];
|
|
List pricetype=[];
|
|
String price_ui='';
|
|
|
|
Color cardColor=Colors.white;
|
|
|
|
GetTanksDetailsModel();
|
|
|
|
factory GetTanksDetailsModel.fromJson(Map<String, dynamic> json){
|
|
GetTanksDetailsModel rtvm = new GetTanksDetailsModel();
|
|
|
|
rtvm.tanker_name = json['tankerName'] ?? '';
|
|
rtvm.tanker_phone = json['phoneNumber'] ?? '';
|
|
rtvm.tanker_alterphone = json['alternative_phoneNumber'] ?? '';
|
|
rtvm.capacity = json['capacity'] ??'';
|
|
|
|
|
|
rtvm.type_of_water = json['typeofwater'] ??[];
|
|
rtvm.type_of_water.forEach((element) {
|
|
rtvm.showTypeofWater.add(element['typeofwater']);
|
|
rtvm.water_type=rtvm.showTypeofWater.join(",");
|
|
|
|
|
|
});
|
|
|
|
rtvm.price = json['price'] ?? [];
|
|
rtvm.price.forEach((element) {
|
|
rtvm.pricetype.add(element['price']);
|
|
rtvm.price_ui=rtvm.pricetype.join(",");
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
return rtvm;
|
|
}
|
|
|
|
} |