|
|
@ -23,6 +23,8 @@ class _AddTankersState extends State<AddTankers> {
|
|
|
|
TextEditingController tankerCapacityController = TextEditingController();
|
|
|
|
TextEditingController tankerCapacityController = TextEditingController();
|
|
|
|
TextEditingController tankerPriceController = TextEditingController();
|
|
|
|
TextEditingController tankerPriceController = TextEditingController();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
bool isCapacityText = false;
|
|
|
|
bool isCapacityText = false;
|
|
|
|
bool isLoading = false;
|
|
|
|
bool isLoading = false;
|
|
|
|
bool isTankerDataLoading = false;
|
|
|
|
bool isTankerDataLoading = false;
|
|
|
@ -35,6 +37,7 @@ class _AddTankersState extends State<AddTankers> {
|
|
|
|
bool isTenChecked = false;
|
|
|
|
bool isTenChecked = false;
|
|
|
|
bool isFifteenChecked = false;
|
|
|
|
bool isFifteenChecked = false;
|
|
|
|
bool isTwentyChecked = false;
|
|
|
|
bool isTwentyChecked = false;
|
|
|
|
|
|
|
|
|
|
|
|
bool isUpdateDrinkingChecked = false;
|
|
|
|
bool isUpdateDrinkingChecked = false;
|
|
|
|
bool isUpdateBoreChecked = false;
|
|
|
|
bool isUpdateBoreChecked = false;
|
|
|
|
bool isUpdateFiveChecked = false;
|
|
|
|
bool isUpdateFiveChecked = false;
|
|
|
@ -79,7 +82,7 @@ class _AddTankersState extends State<AddTankers> {
|
|
|
|
child: Column(
|
|
|
|
child: Column(
|
|
|
|
children: <Widget>[
|
|
|
|
children: <Widget>[
|
|
|
|
const SizedBox(
|
|
|
|
const SizedBox(
|
|
|
|
height: 55,
|
|
|
|
height: 15,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
Container(
|
|
|
|
Container(
|
|
|
|
height: MediaQuery.of(context).size.height * .15,
|
|
|
|
height: MediaQuery.of(context).size.height * .15,
|
|
|
@ -121,7 +124,7 @@ class _AddTankersState extends State<AddTankers> {
|
|
|
|
const SizedBox(
|
|
|
|
const SizedBox(
|
|
|
|
height: 5,
|
|
|
|
height: 5,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
/* Container(
|
|
|
|
Container(
|
|
|
|
padding: const EdgeInsets.all(10),
|
|
|
|
padding: const EdgeInsets.all(10),
|
|
|
|
child: TextFormField(
|
|
|
|
child: TextFormField(
|
|
|
|
cursorColor: greyColor,
|
|
|
|
cursorColor: greyColor,
|
|
|
@ -181,7 +184,7 @@ class _AddTankersState extends State<AddTankers> {
|
|
|
|
), //alternative phone number
|
|
|
|
), //alternative phone number
|
|
|
|
const SizedBox(
|
|
|
|
const SizedBox(
|
|
|
|
height: 5,
|
|
|
|
height: 5,
|
|
|
|
),*/
|
|
|
|
),
|
|
|
|
Visibility(
|
|
|
|
Visibility(
|
|
|
|
visible: true,
|
|
|
|
visible: true,
|
|
|
|
child: Container(
|
|
|
|
child: Container(
|
|
|
@ -485,6 +488,8 @@ class _AddTankersState extends State<AddTankers> {
|
|
|
|
onPressed: () async{
|
|
|
|
onPressed: () async{
|
|
|
|
|
|
|
|
|
|
|
|
if (tankerNameController.text != '' &&
|
|
|
|
if (tankerNameController.text != '' &&
|
|
|
|
|
|
|
|
tankerPhoneNumberController.text != '' &&
|
|
|
|
|
|
|
|
tankerAlternativePhoneNumberController.text != '' &&
|
|
|
|
tankerCapacityController.text != '' &&
|
|
|
|
tankerCapacityController.text != '' &&
|
|
|
|
tankerPriceController.text != '') {
|
|
|
|
tankerPriceController.text != '') {
|
|
|
|
/* waterPrice=[];
|
|
|
|
/* waterPrice=[];
|
|
|
@ -505,8 +510,8 @@ class _AddTankersState extends State<AddTankers> {
|
|
|
|
|
|
|
|
|
|
|
|
var payload = new Map<String, dynamic>();
|
|
|
|
var payload = new Map<String, dynamic>();
|
|
|
|
payload["tankerName"] = tankerNameController.text.toString();
|
|
|
|
payload["tankerName"] = tankerNameController.text.toString();
|
|
|
|
// payload["phoneNumber"] = tankerPhoneNumberController.text.toString();
|
|
|
|
payload["phoneNumber"] = tankerPhoneNumberController.text.toString();
|
|
|
|
// payload["alternative_phoneNumber"] = tankerAlternativePhoneNumberController.text.toString();
|
|
|
|
payload["alternative_phoneNumber"] = tankerAlternativePhoneNumberController.text.toString();
|
|
|
|
payload["capacity"] = tankerCapacityController.text.toString();
|
|
|
|
payload["capacity"] = tankerCapacityController.text.toString();
|
|
|
|
// payload["typeofwater"] = waterTypes;
|
|
|
|
// payload["typeofwater"] = waterTypes;
|
|
|
|
payload["typeofwater"] =dropdownTypeOfWater.toString();
|
|
|
|
payload["typeofwater"] =dropdownTypeOfWater.toString();
|
|
|
@ -522,9 +527,9 @@ class _AddTankersState extends State<AddTankers> {
|
|
|
|
AppSettings.longSuccessToast(
|
|
|
|
AppSettings.longSuccessToast(
|
|
|
|
"Tanker Created Successfully");
|
|
|
|
"Tanker Created Successfully");
|
|
|
|
tankerNameController.text = '';
|
|
|
|
tankerNameController.text = '';
|
|
|
|
//tankerPhoneNumberController.text = '';
|
|
|
|
tankerPhoneNumberController.text = '';
|
|
|
|
tankerCapacityController.text = '';
|
|
|
|
tankerCapacityController.text = '';
|
|
|
|
//tankerAlternativePhoneNumberController.text='';
|
|
|
|
tankerAlternativePhoneNumberController.text='';
|
|
|
|
tankerPriceController.text='';
|
|
|
|
tankerPriceController.text='';
|
|
|
|
//tankerDrinkingPriceController.text='';
|
|
|
|
//tankerDrinkingPriceController.text='';
|
|
|
|
//tankerBorePriceController.text='';
|
|
|
|
//tankerBorePriceController.text='';
|
|
|
|