diff --git a/lib/signup.dart b/lib/signup.dart index d3e83fd..7e60f34 100644 --- a/lib/signup.dart +++ b/lib/signup.dart @@ -48,6 +48,8 @@ class _SignInState extends State { String state = ''; String zip = ''; String country = ''; + double lat = 0; + double lng = 0; PickResult? selectedPlace; @@ -324,6 +326,8 @@ class _SignInState extends State { onPlacePicked: (PickResult result) { setState(() { selectedPlace = result; + lat=selectedPlace!.geometry!.location.lat; + lng=selectedPlace!.geometry!.location.lng; if(selectedPlace!.types!.length==1){ userAddressCapturingController.text = selectedPlace!.formattedAddress!; @@ -506,7 +510,8 @@ class _SignInState extends State { payload["zip"] = zip; payload["country"] = country; payload["notes"] = ''; - + payload["latitude"] = lat.toString(); + payload["longitude"] = lng.toString(); bool signUpStatus = await AppSettings.signUp(payload); try { diff --git a/lib/tankersview.dart b/lib/tankersview.dart index 4cdf0ff..cd13f62 100644 --- a/lib/tankersview.dart +++ b/lib/tankersview.dart @@ -65,8 +65,15 @@ class _TankersViewState extends State { updateTankerAlternatePhoneNumberController.text = object.tanker_alterphone; isDrinkingChecked=object.isDrinking; isBoreChecked = object.isBore; - tankerDrinkingPriceController.text=object.pricetype[0].toString(); - tankerBorePriceController.text=object.pricetype[1].toString(); + if(object.pricetype.length==2){ + tankerDrinkingPriceController.text=object.pricetype[0].toString(); + tankerBorePriceController.text=object.pricetype[1].toString(); + } + else{ + tankerDrinkingPriceController.text=object.pricetype[0].toString(); + tankerBorePriceController.text=''; + } + return showDialog( context: context,