|
|
@ -23,8 +23,6 @@ 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;
|
|
|
@ -37,7 +35,6 @@ 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;
|
|
|
@ -82,7 +79,7 @@ class _AddTankersState extends State<AddTankers> {
|
|
|
|
child: Column(
|
|
|
|
child: Column(
|
|
|
|
children: <Widget>[
|
|
|
|
children: <Widget>[
|
|
|
|
const SizedBox(
|
|
|
|
const SizedBox(
|
|
|
|
height: 15,
|
|
|
|
height: 55,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
Container(
|
|
|
|
Container(
|
|
|
|
height: MediaQuery.of(context).size.height * .15,
|
|
|
|
height: MediaQuery.of(context).size.height * .15,
|
|
|
@ -124,7 +121,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,
|
|
|
@ -184,7 +181,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(
|
|
|
@ -488,8 +485,6 @@ 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=[];
|
|
|
@ -510,8 +505,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();
|
|
|
@ -527,9 +522,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='';
|
|
|
|